diff options
author | Jörg Mayer <jmayer@loplof.de> | 2004-10-01 12:31:52 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2004-10-01 12:31:52 +0000 |
commit | 54e0e363a95a6449f5e1c7d336a8f360d92777a3 (patch) | |
tree | 01e1e6229c5610b00899906a0f04ca19aee3a1aa /wiretap | |
parent | 88b9b09373f23f452d4b7a659ee97ab012e72b87 (diff) | |
download | wireshark-54e0e363a95a6449f5e1c7d336a8f360d92777a3.tar.gz wireshark-54e0e363a95a6449f5e1c7d336a8f360d92777a3.tar.bz2 wireshark-54e0e363a95a6449f5e1c7d336a8f360d92777a3.zip |
Get rid of warnings about shadowed variables (code was ok)
svn path=/trunk/; revision=12171
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/ascend.c | 6 | ||||
-rw-r--r-- | wiretap/dbs-etherwatch.c | 16 | ||||
-rw-r--r-- | wiretap/vms.c | 30 |
3 files changed, 26 insertions, 26 deletions
diff --git a/wiretap/ascend.c b/wiretap/ascend.c index 73c2202b74..b145afb6e4 100644 --- a/wiretap/ascend.c +++ b/wiretap/ascend.c @@ -104,7 +104,7 @@ static const char ascend_w2magic[] = { 'W', 'D', '_', 'D', 'I', 'A', 'L', 'O', ' static gboolean ascend_read(wtap *wth, int *err, gchar **err_info, long *data_offset); static gboolean ascend_seek_read(wtap *wth, long seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int len, + union wtap_pseudo_header *pseudo_head, guint8 *pd, int len, int *err, gchar **err_info); static void ascend_close(wtap *wth); @@ -340,12 +340,12 @@ static gboolean ascend_read(wtap *wth, int *err, gchar **err_info, } static gboolean ascend_seek_read(wtap *wth, long seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int len, + union wtap_pseudo_header *pseudo_head, guint8 *pd, int len, int *err, gchar **err_info) { if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1) return FALSE; - if (! parse_ascend(wth->random_fh, pd, &pseudo_header->ascend, NULL, len)) { + if (! parse_ascend(wth->random_fh, pd, &pseudo_head->ascend, NULL, len)) { *err = WTAP_ERR_BAD_RECORD; *err_info = g_strdup((ascend_parse_error != NULL) ? ascend_parse_error : "parse error"); return FALSE; diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c index 4baff3a339..8b1a8e834d 100644 --- a/wiretap/dbs-etherwatch.c +++ b/wiretap/dbs-etherwatch.c @@ -318,7 +318,7 @@ parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, int *err, int num_items_scanned; int eth_hdr_len, pkt_len, csec; int length_pos, length_from, length; - struct tm time; + struct tm tm; char mon[4]; gchar *p; static gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"; @@ -390,9 +390,9 @@ parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, int *err, num_items_scanned = sscanf(line + LENGTH_POS, "%d byte buffer at %d-%3s-%d %d:%d:%d.%d", &pkt_len, - &time.tm_mday, mon, - &time.tm_year, &time.tm_hour, &time.tm_min, - &time.tm_sec, &csec); + &tm.tm_mday, mon, + &tm.tm_year, &tm.tm_hour, &tm.tm_min, + &tm.tm_sec, &csec); if (num_items_scanned != 8) { *err = WTAP_ERR_BAD_RECORD; @@ -470,11 +470,11 @@ parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, int *err, if (wth) { p = strstr(months, mon); if (p) - time.tm_mon = (p - months) / 3; - time.tm_year -= 1900; + tm.tm_mon = (p - months) / 3; + tm.tm_year -= 1900; - time.tm_isdst = -1; - wth->phdr.ts.tv_sec = mktime(&time); + tm.tm_isdst = -1; + wth->phdr.ts.tv_sec = mktime(&tm); wth->phdr.ts.tv_usec = csec * 10000; wth->phdr.caplen = eth_hdr_len + pkt_len; diff --git a/wiretap/vms.c b/wiretap/vms.c index a43b280cbc..96262d3efe 100644 --- a/wiretap/vms.c +++ b/wiretap/vms.c @@ -369,15 +369,15 @@ parse_vms_rec_hdr(wtap *wth, FILE_T fh, int *err, gchar **err_info) int pkt_len = 0; int pktnum; int csec = 101; - struct tm time; + struct tm tm; char mon[4] = {'J', 'A', 'N', 0}; gchar *p; static gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"; - time.tm_year = 1970; - time.tm_hour = 1; - time.tm_min = 1; - time.tm_sec = 1; + tm.tm_year = 1970; + tm.tm_hour = 1; + tm.tm_min = 1; + tm.tm_sec = 1; /* Skip lines until one starts with a hex number */ do { @@ -397,16 +397,16 @@ parse_vms_rec_hdr(wtap *wth, FILE_T fh, int *err, gchar **err_info) /* First look for the Format 1 type sequencing */ num_items_scanned = sscanf(p, "packet %d at %d-%3s-%d %d:%d:%d.%d", - &pktnum, &time.tm_mday, mon, - &time.tm_year, &time.tm_hour, - &time.tm_min, &time.tm_sec, &csec); + &pktnum, &tm.tm_mday, mon, + &tm.tm_year, &tm.tm_hour, + &tm.tm_min, &tm.tm_sec, &csec); /* Next look for the Format 2 type sequencing */ if (num_items_scanned != 8) { num_items_scanned = sscanf(p, "packet seq # = %d at %d-%3s-%d %d:%d:%d.%d", - &pktnum, &time.tm_mday, mon, - &time.tm_year, &time.tm_hour, - &time.tm_min, &time.tm_sec, &csec); + &pktnum, &tm.tm_mday, mon, + &tm.tm_year, &tm.tm_hour, + &tm.tm_min, &tm.tm_sec, &csec); } /* if unknown format then exit with error */ /* We will need to add code to handle new format */ @@ -435,11 +435,11 @@ parse_vms_rec_hdr(wtap *wth, FILE_T fh, int *err, gchar **err_info) if (wth) { p = strstr(months, mon); if (p) - time.tm_mon = (p - months) / 3; - time.tm_year -= 1900; + tm.tm_mon = (p - months) / 3; + tm.tm_year -= 1900; - time.tm_isdst = -1; - wth->phdr.ts.tv_sec = mktime(&time); + tm.tm_isdst = -1; + wth->phdr.ts.tv_sec = mktime(&tm); wth->phdr.ts.tv_usec = csec * 10000; wth->phdr.caplen = pkt_len; |