fix Coverity dead code
@@ -1036,14 +1036,14 @@ int opt_check_rest_arg(const char *expected)
return 1;
opt_printf_stderr("%s: Missing argument: %s\n", prog, expected);
return 0;
- } else if (expected != NULL) {
- return 1;
}
+ if (expected != NULL)
+ return 1;
if (opt_unknown() == NULL)
opt_printf_stderr("%s: Extra option: \"%s\"\n", prog, opt);
else
opt_printf_stderr("%s: Extra (unknown) options: \"%s\" \"%s\"\n",
- prog, opt_unknown(), opt != NULL ? opt : "");
+ prog, opt_unknown(), opt);
return 0;
}
