]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: check returns [coverity scan]
authorKarel Zak <kzak@redhat.com>
Wed, 27 Mar 2013 13:12:37 +0000 (14:12 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 27 Mar 2013 13:12:37 +0000 (14:12 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/devname.c

index b27b6612c6e30f2e8fa03b7753a269c981cec9a4..dc2e0caa638b6f2aa6f72d3d88cdd2a2ac3fb5fa 100644 (file)
@@ -568,7 +568,8 @@ static int probe_all_removable(blkid_cache cache)
                        continue;
 
                if (sysfs_init(&sysfs, devno, NULL) == 0) {
-                       sysfs_read_int(&sysfs, "removable", &removable);
+                       if (sysfs_read_int(&sysfs, "removable", &removable) != 0)
+                               removable = 0;
                        sysfs_deinit(&sysfs);
                }