summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarel Zak2012-06-21 08:28:49 +0200
committerKarel Zak2012-06-21 08:28:49 +0200
commit1aae31c0488299023346bd2b4f8a8046a8546a8c (patch)
tree803e12112f47f13b5d49d41a3f624706d535b14c /lib
parentlib/mangle: fix a memory leak in the test case (diff)
downloadkernel-qcow2-util-linux-1aae31c0488299023346bd2b4f8a8046a8546a8c.tar.gz
kernel-qcow2-util-linux-1aae31c0488299023346bd2b4f8a8046a8546a8c.tar.xz
kernel-qcow2-util-linux-1aae31c0488299023346bd2b4f8a8046a8546a8c.zip
lib/sysfs: use warn_unused_result for sysfs_init()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sysfs.c b/lib/sysfs.c
index b4fb7cdda..ad90c19c8 100644
--- a/lib/sysfs.c
+++ b/lib/sysfs.c
@@ -622,7 +622,8 @@ int main(int argc, char *argv[])
printf("PARTITION: %s\n",
sysfs_devno_has_attribute(devno, "partition") ? "YES" : "NOT");
- sysfs_init(&cxt, devno, NULL);
+ if (sysfs_init(&cxt, devno, NULL))
+ return EXIT_FAILURE;
len = sysfs_readlink(&cxt, NULL, path, sizeof(path) - 1);
if (len > 0) {