diff options
author | Karel Zak | 2012-06-21 08:28:49 +0200 |
---|---|---|
committer | Karel Zak | 2012-06-21 08:28:49 +0200 |
commit | 1aae31c0488299023346bd2b4f8a8046a8546a8c (patch) | |
tree | 803e12112f47f13b5d49d41a3f624706d535b14c /lib | |
parent | lib/mangle: fix a memory leak in the test case (diff) | |
download | kernel-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.c | 3 |
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) { |