aboutsummaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>1998-10-16 01:18:35 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>1998-10-16 01:18:35 +0000
commita3d425996f213ae9081e4153549b42199d0ae97a (patch)
tree530004cda45554c7702e232392c8e791bc3a3baf /packet.c
parent400f44cad5bf7e0d2225fcf6fd4b35702afb8411 (diff)
* Copied in the correct GNU license (I'm such a goober)
* Hacks to the filter interface (Gerald) * About box (Laurent) * AppleTalk support (Simon) * Mods to the match_strval routine (Gerald) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@61 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/packet.c b/packet.c
index 015571d6ca..90d991991e 100644
--- a/packet.c
+++ b/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.6 1998/10/12 01:40:53 gerald Exp $
+ * $Id: packet.c,v 1.7 1998/10/16 01:18:32 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -198,12 +198,13 @@ collapse_tree(GtkWidget *w, gpointer data) {
Returns the associated string ptr on a match, or NULL on failure.
Len is the length of the array. */
gchar*
-match_strval(guint32 val, value_string *vs, gint len) {
- gint i;
+match_strval(guint32 val, value_string *vs) {
+ gint i = 0;
- for (i = 0; i < len; i++) {
+ while (vs[i].strptr) {
if (vs[i].value == val)
return(vs[i].strptr);
+ i++;
}
return(NULL);