diff options
| author | Kaleb S KEITHLEY <kkeithle@redhat.com> | 2015-12-18 15:21:27 -0500 | 
|---|---|---|
| committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-02-15 01:32:14 -0800 | 
| commit | 62f9659554c07317c9d06251b74171d9eac0917e (patch) | |
| tree | b6296bf8e990d7e027c91ebf8e85c5ff7b1f3dea /xlators/mgmt/glusterd/src/glusterd-handler.c | |
| parent | 954f2901345f42177033418112c052ed0795b295 (diff) | |
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 <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13006
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 608b6dd5d35..c86587f6fbf 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -2274,6 +2274,9 @@ __glusterd_handle_fsm_log (rpcsvc_request_t *req)          GF_ASSERT (req); +        this = THIS; +        GF_VALIDATE_OR_GOTO ("xlator", (this != NULL), out); +          ret = xdr_to_generic (req->msg[0], &cli_req,                                (xdrproc_t)xdr_gf1_cli_fsm_log_req);          if (ret < 0) { @@ -2293,7 +2296,6 @@ __glusterd_handle_fsm_log (rpcsvc_request_t *req)          }          if (strcmp ("", cli_req.name) == 0) { -                this = THIS;                  conf = this->private;                  ret = glusterd_sm_tr_log_add_to_dict (dict, &conf->op_sm_log);          } else { @@ -2917,6 +2919,9 @@ __glusterd_handle_probe_query (rpcsvc_request_t *req)          GF_ASSERT (req); +        this = THIS; +        GF_VALIDATE_OR_GOTO ("xlator", (this != NULL), out); +          ret = xdr_to_generic (req->msg[0], &probe_req,                                (xdrproc_t)xdr_gd1_mgmt_probe_req);          if (ret < 0) { @@ -2928,8 +2933,6 @@ __glusterd_handle_probe_query (rpcsvc_request_t *req)                  goto out;          } -        this = THIS; -          conf = this->private;          if (probe_req.port)                  port = probe_req.port;  | 
