diff options
author | Jeff Downs <heydowns@somuchpressure.net> | 2011-06-23 22:12:37 +0400 |
---|---|---|
committer | Jeff Downs <heydowns@somuchpressure.net> | 2011-06-24 21:04:51 +0400 |
commit | f6d28cf02965e74ff2f772d8632b018375a6c346 (patch) | |
tree | 591ba96a2ac9c58826c2f326c15061dc22ca1825 | |
parent | f925b243818fa320b3c19e4e0554a07b49e8a2be (diff) |
parse_options(): Avoid passing NULL as a string arg to fprintf
-rw-r--r-- | cmdutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c index cd6d13346d..f538d98f14 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -281,7 +281,7 @@ unknown_opt: *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY); } else if (po->u.func_arg) { if (po->u.func_arg(opt, arg) < 0) { - fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt); + fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg ? arg : "[null]", opt); exit(1); } } |