make -h|-hh succeed if the output is successfully written

This commit is contained in:
Petr Skocik 2019-06-11 12:42:26 +02:00
parent d04ce7772c
commit 18a2ed2936

4
tcc.c
View File

@ -264,9 +264,9 @@ redo:
if ((n | t) == 0) {
if (opt == OPT_HELP)
return printf(help), 1;
return 0>fputs(help,stdout) || 0>fclose(stdout);
if (opt == OPT_HELP2)
return printf(help2), 1;
return 0>fputs(help2,stdout) || 0>fclose(stdout);
if (opt == OPT_M32 || opt == OPT_M64)
tcc_tool_cross(s, argv, opt); /* never returns */
if (s->verbose)