aboutsummaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>1998-10-16 01:18:35 +0000
committerGerald Combs <gerald@wireshark.org>1998-10-16 01:18:35 +0000
commit349f96bb49fabf8ada49bb3a258518ed8c472076 (patch)
tree530004cda45554c7702e232392c8e791bc3a3baf /packet.c
parent5a35314f8034441930fe7caa8de6b8e7dec4ae7a (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) svn path=/trunk/; revision=61
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);