]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: fix smatch warning
authorSami Kerola <kerolasa@iki.fi>
Sat, 10 Sep 2011 14:49:03 +0000 (16:49 +0200)
committerSami Kerola <kerolasa@iki.fi>
Sat, 10 Sep 2011 14:49:03 +0000 (16:49 +0200)
libblkid/src/probe.c +798 blkid_probe_get_idmag(32) error: we previously assumed 'id' could be null.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libblkid/src/probe.c

index 7d0c9f9586ff12c8de3826bcab9389a4950602b9..2902de9bd086e5ae3c4fcc5ff2303359d303a6df 100644 (file)
@@ -795,7 +795,7 @@ int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id,
                mag++;
        }
 
-       if (id->magics && id->magics[0].magic)
+       if (id && id->magics && id->magics[0].magic)
                /* magic string(s) defined, but not found */
                return 1;