diff options
| author | Michael Scherer <misc@redhat.com> | 2017-02-23 22:29:28 +0100 |
|---|---|---|
| committer | gluster-ant <bugzilla-bot@gluster.org> | 2017-02-23 22:29:28 +0100 |
| commit | ff3a009b1d5ee453da08820384f949dd03bdeee2 (patch) | |
| tree | 70b58023030a2aa2049e798dfb7465e5792a64ca /cli/src | |
| parent | 68fa2764e3565e5c491ce160ac4ca9d7bc352ac7 (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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index 5f0441fdf9..2a7810d974 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 |
