diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-05-03 05:50:30 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-05-03 05:50:30 +0000 |
commit | 3c06dfc751dd431ef81b3de5e02f190243362e1b (patch) | |
tree | e2639052f2759e641831ca20de12844b2526a85e /wiretap/network_instruments.c | |
parent | 491fe27a2097846d8b399adab80b90b10c7601e8 (diff) |
Squelch a compiler warning - but note, in a comment, a real problem the
warning points out.
svn path=/trunk/; revision=36972
Diffstat (limited to 'wiretap/network_instruments.c')
-rw-r--r-- | wiretap/network_instruments.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/network_instruments.c b/wiretap/network_instruments.c index 87654a96c5..729c199f60 100644 --- a/wiretap/network_instruments.c +++ b/wiretap/network_instruments.c @@ -676,7 +676,8 @@ static gboolean observer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, packet_header.captured_size = (guint16) phdr->caplen; packet_header.network_size = (guint16) (phdr->len + 4); packet_header.offset_to_frame = sizeof(packet_header); - packet_header.offset_to_next_packet = sizeof(packet_header) + phdr->caplen; + /* XXX - what if this doesn't fit in 16 bits? It's not guaranteed to... */ + packet_header.offset_to_next_packet = (guint16)sizeof(packet_header) + phdr->caplen; packet_header.network_type = private_state->network_type; packet_header.flags = 0x00; packet_header.number_of_information_elements = 0; |