Commit 7be677a8 by S.Çağlar Onur Committed by Stéphane Graber

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

parent d380c7ff
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment