From 621c40507637d2a19bd892825eec7a8e2d4b53f3 Mon Sep 17 00:00:00 2001 From: Chad Malfait Date: Sat, 6 Apr 2013 20:34:09 -0600 Subject: [PATCH] Returning lvm_errno on error --- src/volume.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/volume.c b/src/volume.c index 3cb6d28c..b5424aa0 100644 --- a/src/volume.c +++ b/src/volume.c @@ -45,20 +45,19 @@ static int volume_read(void) { lvm_t lvm; vg_t vg; - int status = 0; struct dm_list *vg_names; struct lvm_str_list *name_list; lvm = lvm_init(NULL); if (!lvm) { - status = lvm_errno(lvm); ERROR("volume plugin: lvm_init failed: %s", lvm_errmsg(lvm)); + return (lvm_errno(lvm)); } vg_names = lvm_list_vg_names(lvm); if (!vg_names) { - status = lvm_errno(lvm); ERROR("volume plugin lvm_list_vg_name failed %s", lvm_errmsg(lvm)); + return (lvm_errno(lvm)); } dm_list_iterate_items(name_list, vg_names) { -- 2.30.2