summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2017-02-23 22:29:28 +0100
committerJeff Darcy <jdarcy@redhat.com>2017-03-01 13:20:15 -0500
commit3c8b3a322d1ecbf99e4718abede32d739bda491c (patch)
treed6eda012545800c30db752096423de2da59b6efd /cli/src
parenta2d4c928e93c95dfe2ceff450556f8494d67e654 (diff)
Do not use va_end before cli_rl_out, since it use ap
Trigger a cppcheck error Change-Id: I8919fed47ef562319ac6baff38ed993e7cd54708 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16741 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 5f0441fdf98..2a7810d9743 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -527,8 +527,9 @@ _cli_err (const char *fmt, ...)
#ifdef HAVE_READLINE
if (state->rl_enabled && !state->rl_processing) {
+ ret = cli_rl_err (state, fmt, ap);
va_end (ap);
- return cli_rl_err (state, fmt, ap);
+ return ret;
}
#endif
@@ -552,8 +553,9 @@ _cli_out (const char *fmt, ...)
va_start (ap, fmt);
#ifdef HAVE_READLINE
if (state->rl_enabled && !state->rl_processing) {
+ ret = cli_rl_out (state, fmt, ap);
va_end (ap);
- return cli_rl_out (state, fmt, ap);
+ return ret;
}
#endif