summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/argp-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'libshouldbeinlibc/argp-parse.c')
-rw-r--r--libshouldbeinlibc/argp-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c
index 28bb9561..0fb17bf3 100644
--- a/libshouldbeinlibc/argp-parse.c
+++ b/libshouldbeinlibc/argp-parse.c
@@ -620,7 +620,7 @@ argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
else
/* No way to return the remaining arguments, they must be bogus. */
{
- if (! (state.flags & ARGP_NO_ERRS))
+ if (!(state.flags & ARGP_NO_ERRS) && state.err_stream)
fprintf (state.err_stream, "%s: Too many arguments\n", state.name);
err = EBADKEY;
}