From: Chad Malfait Date: Sun, 7 Apr 2013 02:34:09 +0000 (-0600) Subject: Returning lvm_errno on error X-Git-Tag: collectd-5.4.0~56^2~9 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=621c40507637d2a19bd892825eec7a8e2d4b53f3;p=collectd.git Returning lvm_errno on error --- 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) {