Quiet a bogus gcc warning.

This commit is contained in:
Todd C. Miller
2011-12-20 13:50:48 -05:00
parent 089ee42228
commit 7799d01cfa

View File

@@ -100,7 +100,7 @@ sudo_edit(struct command_details *command_details)
char *ofile; char *ofile;
struct timeval omtim; struct timeval omtim;
off_t osize; off_t osize;
} *tf; } *tf = NULL;
debug_decl(sudo_edit, SUDO_DEBUG_EDIT) debug_decl(sudo_edit, SUDO_DEBUG_EDIT)
/* /*
@@ -324,9 +324,11 @@ sudo_edit(struct command_details *command_details)
cleanup: cleanup:
/* Clean up temp files and return. */ /* Clean up temp files and return. */
for (i = 0; i < nfiles; i++) { if (tf != NULL) {
if (tf[i].tfile != NULL) for (i = 0; i < nfiles; i++) {
unlink(tf[i].tfile); if (tf[i].tfile != NULL)
unlink(tf[i].tfile);
}
} }
debug_return_int(1); debug_return_int(1);
} }