From 62f9659554c07317c9d06251b74171d9eac0917e Mon Sep 17 00:00:00 2001 From: Kaleb S KEITHLEY Date: Fri, 18 Dec 2015 15:21:27 -0500 Subject: all: fix various cppcheck warnings fixes for various warnings reported by cppcheck N.B. cppcheck output is in the bugzilla Change-Id: I33acec127bc4536935fdd8d52a0c490ec54d50b2 BUG: 1292954 Signed-off-by: Kaleb S KEITHLEY Reviewed-on: http://review.gluster.org/13006 Reviewed-by: Jeff Darcy Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-snapshot.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 3373c93fd42..cb1c8e951e5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -6178,9 +6178,9 @@ glusterd_do_snap_cleanup (dict_t *dict, char **op_errstr, dict_t *rsp_dict) { int32_t ret = -1; char *name = NULL; + char *volname = NULL; xlator_t *this = NULL; glusterd_conf_t *conf = NULL; - glusterd_volinfo_t *volinfo = NULL; glusterd_snap_t *snap = NULL; this = THIS; @@ -6194,11 +6194,19 @@ glusterd_do_snap_cleanup (dict_t *dict, char **op_errstr, dict_t *rsp_dict) goto out; } + ret = dict_get_str (dict, "volname", &volname); + if (ret) { + gf_msg ("glusterd", GF_LOG_ERROR, 0, + GD_MSG_DICT_GET_FAILED, "Unable to get" + " volume name"); + goto out; + } + ret = dict_get_str (dict, "snapname", &name); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_GET_FAILED, "getting the snap " - "name failed (volume: %s)", volinfo->volname); + "name failed (volume: %s)", volname); goto out; } -- cgit