summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-06-17 03:59:37 +0000
committerMiles Bader <miles@gnu.org>1996-06-17 03:59:37 +0000
commit58f84a640d920b8d9377abdc114415611b1b7879 (patch)
tree09143284d6b3724f1aa03303833c97fbe26d4b77
parentbe5c0a1f1f002df03c1f4fa129edae26a8a12115 (diff)
(argp_parse): Handle null streams.
-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;
}