aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-05-16 16:29:12 +0000
committerGerald Combs <gerald@wireshark.org>2012-05-16 16:29:12 +0000
commitbdb614e264d73aef418058cc22beac80b1c6026b (patch)
tree651d12b16a08aad155bea4b4cf4698edb90010d6 /wiretap
parent46e202503a13b6e06110901cf28e0537d6054dcf (diff)
Fix a bunch of uninitialized variables found by Coverity Scan. CIDs
702403, 702404, 702405, 702406, 702407, 702408, 702409, 702410, 702411, and 702412. svn path=/trunk/; revision=42658
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/catapult_dct2000.c5
-rw-r--r--wiretap/dbs-etherwatch.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c
index ef6769d998..dcd663cad3 100644
--- a/wiretap/catapult_dct2000.c
+++ b/wiretap/catapult_dct2000.c
@@ -455,7 +455,7 @@ catapult_dct2000_seek_read(wtap *wth, gint64 seek_off,
union wtap_pseudo_header *pseudo_header, guint8 *pd,
int length, int *err, gchar **err_info)
{
- gint64 offset;
+ gint64 offset = 0;
long dollar_offset, before_time_offset, after_time_offset;
static gchar linebuff[MAX_LINE_LENGTH+1];
gchar aal_header_chars[AAL_HEADER_CHARS];
@@ -749,7 +749,7 @@ catapult_dct2000_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
}
if (!is_comment) {
- /* Each binary byte is written out as 2 hex string chars */
+ /* Each binary byte is written out as 2 hex string chars */
for (; n < phdr->len; n++) {
gchar c[2];
c[0] = char_from_hex((guint8)(pd[n] >> 4));
@@ -1589,4 +1589,3 @@ free_line_prefix_info(gpointer key, gpointer value,
/* Item will always be removed from table */
return TRUE;
}
-
diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c
index b07677c480..8f7d8668f6 100644
--- a/wiretap/dbs-etherwatch.c
+++ b/wiretap/dbs-etherwatch.c
@@ -332,6 +332,7 @@ parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, int *err,
int count, line_count;
eth_hdr_len = 0;
+ memset(&tm, 0, sizeof(tm));
/* Our file pointer should be on the first line containing the
* summary information for a packet. Read in that line and
* extract the useful information
@@ -406,7 +407,7 @@ parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, int *err,
*err_info = g_strdup("dbs_etherwatch: header line not valid");
return -1;
}
-
+
/* Determine whether it is Ethernet II or IEEE 802 */
if(strncmp(&line[ETH_II_CHECK_POS], ETH_II_CHECK_STR,
strlen(ETH_II_CHECK_STR)) == 0) {
@@ -574,7 +575,7 @@ parse_single_hex_dump_line(char* rec, guint8 *buf, int byte_offset) {
else
{
pos = COUNT_POS_HEX;
- }
+ }
/* Check that the record is as least as long as the start position */
while(i < pos)