From: S.Çağlar Onur Date: Fri, 15 Nov 2013 05:33:54 +0000 (-0500) Subject: p is a pointer and cannot be negative so check if it is NULL X-Git-Tag: lxc-1.0.0.beta1~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7be677a8aa2a8839fa1f2acd5afab0c6f1b3a467;p=thirdparty%2Flxc.git p is a pointer and cannot be negative so check if it is NULL Signed-off-by: S.Çağlar Onur Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 3fab9ae7e..e2d263900 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -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; }