From 819c605bfc2ad2724fc068b1fd90ec57febac5a6 Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Sun, 3 Jun 2018 18:25:41 +0200 Subject: [PATCH] policycoreutils/hll/pp: remove unused variable pp's main() never set outfd to anything else than -1 so there is no point in closing it. Signed-off-by: Nicolas Iooss --- policycoreutils/hll/pp/pp.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/policycoreutils/hll/pp/pp.c b/policycoreutils/hll/pp/pp.c index b97a9b34..98969eb2 100644 --- a/policycoreutils/hll/pp/pp.c +++ b/policycoreutils/hll/pp/pp.c @@ -73,7 +73,6 @@ int main(int argc, char **argv) const char *ofile = NULL; FILE *in = NULL; FILE *out = NULL; - int outfd = -1; // ignore sigpipe so we can check the return code of write, and potentially // return a more helpful error message @@ -159,12 +158,6 @@ exit: if (out != NULL) { fclose(out); } - if (outfd != -1) { - close(outfd); - if (rc != 0) { - unlink(argv[2]); - } - } sepol_module_package_free(mod_pkg); return rc;