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 /cli/src/cli.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 'cli/src/cli.c')
-rw-r--r-- | cli/src/cli.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index 46736bbf76d..118a94f0b41 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -496,8 +496,10 @@ _cli_err (const char *fmt, ...) va_start (ap, fmt); #ifdef HAVE_READLINE - if (state->rl_enabled && !state->rl_processing) - return cli_rl_err(state, fmt, ap); + if (state->rl_enabled && !state->rl_processing) { + va_end (ap); + return cli_rl_err (state, fmt, ap); + } #endif ret = vfprintf (stderr, fmt, ap); @@ -520,8 +522,10 @@ _cli_out (const char *fmt, ...) va_start (ap, fmt); #ifdef HAVE_READLINE - if (state->rl_enabled && !state->rl_processing) - return cli_rl_out(state, fmt, ap); + if (state->rl_enabled && !state->rl_processing) { + va_end (ap); + return cli_rl_out (state, fmt, ap); + } #endif ret = vprintf (fmt, ap); |