summaryrefslogtreecommitdiffstats
path: root/libblkid
diff options
context:
space:
mode:
authorSami Kerola2011-09-10 16:49:03 +0200
committerSami Kerola2011-09-10 16:49:03 +0200
commitd6d11fa5c636c9900b922717dfc6492aaad89b7f (patch)
tree1c2af667f4cbdf827fabb91f784a155f634a5679 /libblkid
parentcolumn: fix error reported by smatch (diff)
downloadkernel-qcow2-util-linux-d6d11fa5c636c9900b922717dfc6492aaad89b7f.tar.gz
kernel-qcow2-util-linux-d6d11fa5c636c9900b922717dfc6492aaad89b7f.tar.xz
kernel-qcow2-util-linux-d6d11fa5c636c9900b922717dfc6492aaad89b7f.zip
libblkid: fix smatch warning
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>
Diffstat (limited to 'libblkid')
-rw-r--r--libblkid/src/probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index 7d0c9f958..2902de9bd 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -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;