p is a pointer and cannot be negative so check if it is NULL

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
S.Çağlar Onur 2013-11-15 00:33:54 -05:00 committed by Stéphane Graber
parent d380c7ff55
commit 7be677a8aa

View File

@ -483,7 +483,7 @@ int sha1sum_file(char *fnam, unsigned char *digest)
process_lock();
f = fopen_cloexec(fnam, "r");
process_unlock();
if (f < 0) {
if (!f) {
SYSERROR("Error opening template");
return -1;
}