From 544818d97de270a7d0f48e4d046664659e99470e Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 24 Feb 2004 05:52:30 +0000 Subject: Small cleanup - the for loop was left over from earlier code that kept searching backwards for a backslash until it found one followed by "Device\", and no longer looped. svn path=/trunk/; revision=10217 --- gtk/capture_dlg.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'gtk/capture_dlg.c') diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 824868fc49..04ce5596ab 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -1,7 +1,7 @@ /* capture_dlg.c * Routines for packet capture windows * - * $Id: capture_dlg.c,v 1.109 2004/02/24 02:19:16 gerald Exp $ + * $Id: capture_dlg.c,v 1.110 2004/02/24 05:52:30 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -155,15 +155,13 @@ get_if_name(char *if_text) * return the entire string; otherwise, skip the colon and any blanks * after it, and return that string. */ - if_name = if_text; - for (;;) { - if_name = strrchr(if_name, ':'); - if (if_name == NULL) - return if_text; /* give up */ - if_name++; /* skip the colon */ + if_name = strrchr(if_text, ':'); + if (if_name == NULL) { + if_name = if_text; + } else { + if_name++; while (*if_name == ' ') if_name++; - return if_name; } #else /* -- cgit v1.2.3