aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nt-tpcp.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2010-08-05 07:09:59 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2010-08-05 07:09:59 +0000
commit5dc817d6d626913e8e0f22307545c9441ccf40e7 (patch)
treee4ee7a0c5b78b005315fea4b4dda447fad0cfd51 /epan/dissectors/packet-nt-tpcp.c
parentb91b0515cc430b21af9bd3b4badf300c0b0a22f9 (diff)
Initialize tpcph to avoid warnings from clang:
"The left operand of '>>' is a garbage value". svn path=/trunk/; revision=33713
Diffstat (limited to 'epan/dissectors/packet-nt-tpcp.c')
-rw-r--r--epan/dissectors/packet-nt-tpcp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-nt-tpcp.c b/epan/dissectors/packet-nt-tpcp.c
index 93484a30a9..d3d8be0a28 100644
--- a/epan/dissectors/packet-nt-tpcp.c
+++ b/epan/dissectors/packet-nt-tpcp.c
@@ -28,6 +28,7 @@
#endif
#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -123,6 +124,8 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else if (tpcph.version == TPCP_VER_2){
length = TPCP_VER_2_LENGTH;
tvb_memcpy(tvb, (guint8 *) &tpcph, 0, length);
+ } else {
+ memset (&tpcph, 0, sizeof (tpcph));
}