From: Karel Zak Date: Wed, 27 Mar 2013 13:38:07 +0000 (+0100) Subject: getopt: fix normalize() usage [coverity scan] X-Git-Tag: v2.23-rc2~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31bfda07a4d00ff1b011aff3ad84112adfc0250f;p=thirdparty%2Futil-linux.git getopt: fix normalize() usage [coverity scan] Signed-off-by: Karel Zak --- diff --git a/misc-utils/getopt.c b/misc-utils/getopt.c index a597800429..55a331f442 100644 --- a/misc-utils/getopt.c +++ b/misc-utils/getopt.c @@ -190,7 +190,7 @@ static int generate_output(char *argv[], int argc, const char *optstr, if (longopts[longindex].has_arg) printf(" %s", normalize(optarg ? optarg : "")); } else if (opt == NON_OPT) - printf(" %s", normalize(optarg)); + printf(" %s", normalize(optarg ? optarg : "")); else { printf(" -%c", opt); charptr = strchr(optstr, opt);