diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-04-22 03:07:37 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-04-22 03:07:37 +0000 |
commit | ad33ca6c2f33d2b842d2b7891513d57336ab89cc (patch) | |
tree | df299ef604107c294e223b6c40431136cdb90cd4 /wiretap/snoop.c | |
parent | 043b2b20ac210a0f29894909da7f29473e8c5161 (diff) | |
download | wireshark-ad33ca6c2f33d2b842d2b7891513d57336ab89cc.tar.gz |
Clean up some 64-bit issues.
svn path=/trunk/; revision=28117
Diffstat (limited to 'wiretap/snoop.c')
-rw-r--r-- | wiretap/snoop.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 57020a10ce..7862df5680 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -352,7 +352,7 @@ int snoop_open(wtap *wth, int *err, gchar **err_info) * Well, we have padding; how much? */ padbytes = g_ntohl(rec_hdr.rec_len) - - (sizeof rec_hdr + g_ntohl(rec_hdr.incl_len)); + ((guint)sizeof rec_hdr + g_ntohl(rec_hdr.incl_len)); /* * Is it at least the size of a Shomiti trailer? @@ -495,9 +495,9 @@ static gboolean snoop_read(wtap *wth, int *err, gchar **err_info, /* * Don't count the pseudo-header as part of the packet. */ - rec_size -= sizeof (struct snoop_atm_hdr); - orig_size -= sizeof (struct snoop_atm_hdr); - packet_size -= sizeof (struct snoop_atm_hdr); + rec_size -= (guint32)sizeof (struct snoop_atm_hdr); + orig_size -= (guint32)sizeof (struct snoop_atm_hdr); + packet_size -= (guint32)sizeof (struct snoop_atm_hdr); wth->data_offset += sizeof (struct snoop_atm_hdr); break; @@ -531,9 +531,9 @@ static gboolean snoop_read(wtap *wth, int *err, gchar **err_info, /* * Don't count the pseudo-header as part of the packet. */ - rec_size -= sizeof (shomiti_wireless_header); - orig_size -= sizeof (shomiti_wireless_header); - packet_size -= sizeof (shomiti_wireless_header); + rec_size -= (guint32)sizeof (shomiti_wireless_header); + orig_size -= (guint32)sizeof (shomiti_wireless_header); + packet_size -= (guint32)sizeof (shomiti_wireless_header); wth->data_offset += sizeof (shomiti_wireless_header); break; } @@ -575,7 +575,7 @@ static gboolean snoop_read(wtap *wth, int *err, gchar **err_info, rec_size, packet_size); return FALSE; } - padbytes = rec_size - (sizeof hdr + packet_size); + padbytes = rec_size - ((guint)sizeof hdr + packet_size); while (padbytes != 0) { bytes_to_read = padbytes; if ((unsigned)bytes_to_read > sizeof padbuf) @@ -873,7 +873,7 @@ static gboolean snoop_dump(wtap_dumper *wdh, atm_hdrsize = 0; /* Record length = header length plus data length... */ - reclen = sizeof rec_hdr + phdr->caplen + atm_hdrsize; + reclen = (int)sizeof rec_hdr + phdr->caplen + atm_hdrsize; /* ... plus enough bytes to pad it to a 4-byte boundary. */ padlen = ((reclen + 3) & ~3) - reclen; |