]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: null check after dereference
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 21 May 2014 16:53:11 +0000 (11:53 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 21 May 2014 19:28:54 +0000 (15:28 -0400)
we actually meant to check *p not p.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/conf.c

index 78d9de2ce987bfa2037c3c08682f4a96b265209b..a3d1f68796f3f371cd82e5a034be6ed1af8b7099 100644 (file)
@@ -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++;
        }