From 349f96bb49fabf8ada49bb3a258518ed8c472076 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 16 Oct 1998 01:18:35 +0000 Subject: * 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 --- packet.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'packet.c') 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 @@ -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); -- cgit v1.2.3