summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-06-19 01:10:52 +0000
committerMiles Bader <miles@gnu.org>1996-06-19 01:10:52 +0000
commit06d8fa4db5f6bed417b8815bb0bb991c46b30677 (patch)
treeb7f2abc7ed7179c31073a1fe6c5d1e0f8f2729b1 /libshouldbeinlibc
parent7d67004cba7d4eed6e12df01abbc177f4c8e17bc (diff)
(argp_failure): If FMT is 0, don't print `: MSG'.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/argp-help.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/libshouldbeinlibc/argp-help.c b/libshouldbeinlibc/argp-help.c
index 96a020c8..5c9907f0 100644
--- a/libshouldbeinlibc/argp-help.c
+++ b/libshouldbeinlibc/argp-help.c
@@ -871,15 +871,19 @@ argp_failure (struct argp_state *state, int status, int errnum,
if (stream)
{
- va_list ap;
-
fputs (state ? state->name : program_invocation_name, stream);
- putc (':', stream);
- putc (' ', stream);
- va_start (ap, fmt);
- vfprintf (stream, fmt, ap);
- va_end (ap);
+ if (fmt)
+ {
+ va_list ap;
+
+ putc (':', stream);
+ putc (' ', stream);
+
+ va_start (ap, fmt);
+ vfprintf (stream, fmt, ap);
+ va_end (ap);
+ }
if (errnum)
{