From: Serge Hallyn Date: Wed, 21 May 2014 16:53:11 +0000 (-0500) Subject: coverity: null check after dereference X-Git-Tag: lxc-1.0.4~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=689a90a61cd90c508a42c204088b7735488de041;p=thirdparty%2Flxc.git coverity: null check after dereference we actually meant to check *p not p. Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 78d9de2ce..a3d1f6879 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3768,7 +3768,7 @@ static char *get_field(char *src, int nfields) for (i = 0; i < nfields; i++) { while (*p && *p != ' ' && *p != '\t') p++; - if (!p) + if (!*p) break; p++; }