aboutsummaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-12-12 05:11:57 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-12-12 05:11:57 +0000
commitd85f804b4b6ced4271ae4ec9b6f46728a4388266 (patch)
tree4d548cd7b4303d140790cc3e012b051e10874c34 /packet.c
parentd12309b4d37440aa68770119d7e5cf7b190ab477 (diff)
downloadwireshark-d85f804b4b6ced4271ae4ec9b6f46728a4388266.tar.gz
wireshark-d85f804b4b6ced4271ae4ec9b6f46728a4388266.tar.bz2
wireshark-d85f804b4b6ced4271ae4ec9b6f46728a4388266.zip
Add the who protocol (rwho/rwhod/ruptime)
In packet_hex_print(), compute (bstart + blen) only once. In time_secs_to_str(), return a meaningful string when time == 0, instead of returing pointer to char buffer with old, inappropriate data in it. svn path=/trunk/; revision=1297
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index d4dbc57233..5ffb41e656 100644
--- a/packet.c
+++ b/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.58 1999/12/02 01:33:55 guy Exp $
+ * $Id: packet.c,v 1.59 1999/12/12 05:11:45 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -190,6 +190,11 @@ time_secs_to_str(guint32 time)
cur = &str[0][0];
}
+ if (time == 0) {
+ sprintf(cur, "0 time");
+ return cur;
+ }
+
secs = time % 60;
time /= 60;
mins = time % 60;