diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-12-10 02:15:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-12-10 02:15:54 +0000 |
commit | 0823c63775355650bc1bdfaa3d48ade6626fb2b4 (patch) | |
tree | 85a4feb21b935454afc334b80d5aac9e488ad1e4 | |
parent | dca6cf394f94da0b83482e4f42241560edbcb333 (diff) | |
download | wireshark-0823c63775355650bc1bdfaa3d48ade6626fb2b4.tar.gz wireshark-0823c63775355650bc1bdfaa3d48ade6626fb2b4.tar.bz2 wireshark-0823c63775355650bc1bdfaa3d48ade6626fb2b4.zip |
The packet length is an unsigned quantity; print it with "%u".
If we get an illegal column type in "fill_in_columns()", crash.
svn path=/trunk/; revision=4373
-rw-r--r-- | epan/column-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c index 4e57baaa42..dbae5d6ee3 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -1,7 +1,7 @@ /* column-utils.c * Routines for column utilities. * - * $Id: column-utils.c,v 1.8 2001/12/10 00:26:16 guy Exp $ + * $Id: column-utils.c,v 1.9 2001/12/10 02:15:54 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -557,11 +557,12 @@ fill_in_columns(packet_info *pinfo) break; case COL_PACKET_LENGTH: - snprintf(pinfo->cinfo->col_buf[i], COL_MAX_LEN, "%d", pinfo->fd->pkt_len); + snprintf(pinfo->cinfo->col_buf[i], COL_MAX_LEN, "%u", pinfo->fd->pkt_len); pinfo->cinfo->col_data[i] = pinfo->cinfo->col_buf[i]; break; case NUM_COL_FMTS: /* keep compiler happy - shouldn't get here */ + g_assert_not_reached(); break; } } |