aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2017-10-14 21:04:14 +0100
committerMichael Mann <mmann78@netscape.net>2017-10-14 20:51:18 +0000
commit2ecc51f28f42644c655d2d86790b90f7a5ba81c7 (patch)
tree9a70628aab47b83da8ab86742c5ba096e9a83c89
parentc2f1ab1cbcc07af13935c037534148b132aec46b (diff)
Some trivial fixes from running cppcheck.
The packet-per.c intialisation of ext_length is not really needed - idx could be -1 with or without extension_flag being set. But it'd be best not to have someone need to think this through again. Change-Id: If07f98ac7d7f2619149e35a2a0d75b765839a7ba Reviewed-on: https://code.wireshark.org/review/23905 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-per.c2
-rw-r--r--epan/dissectors/packet-rtmpt.c1
-rw-r--r--extcap/ssh-base.c4
3 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index d7379c1..8e649b3 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -1697,7 +1697,7 @@ dissect_per_choice(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *
int extension_addition_entries;
guint32 choice_index;
int i, idx, cidx;
- guint32 ext_length;
+ guint32 ext_length = 0;
guint32 old_offset = offset;
proto_item *choice_item = NULL;
proto_tree *choice_tree = NULL;
diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c
index fb2a691..0145309 100644
--- a/epan/dissectors/packet-rtmpt.c
+++ b/epan/dissectors/packet-rtmpt.c
@@ -530,6 +530,7 @@ static void rtmpt_debug(const char *fmt, ...)
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
+ va_end(args);
}
#define RTMPT_DEBUG rtmpt_debug
#else
diff --git a/extcap/ssh-base.c b/extcap/ssh-base.c
index aabf2a8..f1961dc 100644
--- a/extcap/ssh-base.c
+++ b/extcap/ssh-base.c
@@ -77,13 +77,13 @@ ssh_session create_ssh_connection(const char* hostname, const guint16 port, cons
}
#ifdef HAVE_LIBSSH_USERAUTH_AGENT
- g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, ("Connecting using ssh-agent...");
+ g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "Connecting using ssh-agent...");
/* Try to authenticate using ssh agent */
if (ssh_userauth_agent(sshs, NULL) == SSH_AUTH_SUCCESS) {
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "done");
return sshs;
}
- g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, ("failed");
+ g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "failed");
#endif
/* If a public key path has been provided, try to authenticate using it */