checkpolicy: remove a redundant if-condition

Inner if-condition in following code is redundant:

	if (outfile) {
		/* ... just referring outfile ... */
		if (outfile) {
			do_something();
		}
	}

We can simplify this to:

	if (outfile) {
		/* ... just referring outfile ... */
		do_something();
	}

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
This commit is contained in:
Masatake YAMATO 2019-10-19 19:26:54 +09:00 committed by Stephen Smalley
parent 7494bb1298
commit a581560eb0
1 changed files with 1 additions and 3 deletions

View File

@ -682,9 +682,7 @@ int main(int argc, char **argv)
}
}
if (outfile) {
fclose(outfp);
}
fclose(outfp);
} else if (cil) {
fprintf(stderr, "%s: No file to write CIL was specified\n", argv[0]);
exit(1);