From: Karel Zak Date: Wed, 27 Mar 2013 13:12:37 +0000 (+0100) Subject: libblkid: check returns [coverity scan] X-Git-Tag: v2.23-rc2~110 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb542dff6a919aafaa9ca3febe77fbe8fdaf1790;p=thirdparty%2Futil-linux.git libblkid: check returns [coverity scan] Signed-off-by: Karel Zak --- diff --git a/libblkid/src/devname.c b/libblkid/src/devname.c index b27b6612c6..dc2e0caa63 100644 --- a/libblkid/src/devname.c +++ b/libblkid/src/devname.c @@ -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); }