diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-02-24 05:52:30 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-02-24 05:52:30 +0000 |
commit | 544818d97de270a7d0f48e4d046664659e99470e (patch) | |
tree | ce74c67eb366558d11459c2282940834d166ec4c /gtk/capture_dlg.c | |
parent | b8b799ed54ac6f38de93aab8b4c365671d06f5a7 (diff) |
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
Diffstat (limited to 'gtk/capture_dlg.c')
-rw-r--r-- | gtk/capture_dlg.c | 14 |
1 files changed, 6 insertions, 8 deletions
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 <gerald@ethereal.com> @@ -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 /* |