From: Todd C. Miller Date: Wed, 15 Jan 2014 13:13:23 +0000 (-0700) Subject: Eliminate dead store found by clang checker. X-Git-Tag: SUDO_1_8_10^2~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f88e95bc9244aef23b588385255d579e98d11cc;p=sudo Eliminate dead store found by clang checker. --- diff --git a/plugins/sudoers/visudo_json.c b/plugins/sudoers/visudo_json.c index f629435be..f9381df60 100644 --- a/plugins/sudoers/visudo_json.c +++ b/plugins/sudoers/visudo_json.c @@ -995,12 +995,12 @@ export_sudoers(const char *sudoers_path, const char *export_path, warning(U_("unable to open %s"), sudoers_path); goto done; } - if (strcmp(export_path, "-") == 0) { - export_path = "stdout"; - } else if ((export_fp = fopen(export_path, "w")) == NULL) { - if (!quiet) - warning(U_("unable to open %s"), export_path); - goto done; + if (strcmp(export_path, "-") != 0) { + if ((export_fp = fopen(export_path, "w")) == NULL) { + if (!quiet) + warning(U_("unable to open %s"), export_path); + goto done; + } } init_parser(sudoers_path, quiet); if (sudoersparse() && !parse_error) {