From 58f84a640d920b8d9377abdc114415611b1b7879 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 17 Jun 1996 03:59:37 +0000 Subject: (argp_parse): Handle null streams. --- libshouldbeinlibc/argp-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libshouldbeinlibc/argp-parse.c') 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; } -- cgit v1.2.3