Skip to content

Commit 5979701

Browse files
committed
[Fix] Use fprintf for error messages in argus_parse function
1 parent a5431d0 commit 5979701

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/api/argus_parse.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ int argus_parse(argus_t *argus, int argc, char **argv)
1818
exit(ARGUS_SUCCESS);
1919
}
2020
if (status != ARGUS_SUCCESS) {
21-
printf("\n");
21+
fprintf(stderr, "\n");
2222
display_usage(argus, NULL);
23-
printf("\nTry '%s", argus->program_name);
23+
fprintf(stderr, "\nTry '%s", argus->program_name);
2424
for (size_t i = 0; i < argus->subcommand_depth; ++i)
25-
printf(" %s", argus->subcommand_stack[i]->name);
26-
printf(" --help' for more information.\n");
25+
fprintf(stderr, " %s", argus->subcommand_stack[i]->name);
26+
fprintf(stderr, " --help' for more information.\n");
2727
argus_free(argus);
2828
return (status);
2929
}

0 commit comments

Comments
 (0)