aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/main.c
diff options
context:
space:
mode:
authorOlivier Abad <oabad@noos.fr>2002-11-10 11:41:45 +0000
committerOlivier Abad <oabad@noos.fr>2002-11-10 11:41:45 +0000
commit425e7406d2db5c28e1814d7c90980f27006daa55 (patch)
treeb60f0412e98bc8ece262c04baeffcf318b50f23b /gtk/main.c
parent573f0840ebf901632876caffbc94a59ad1df7717 (diff)
downloadwireshark-425e7406d2db5c28e1814d7c90980f27006daa55.tar.gz
wireshark-425e7406d2db5c28e1814d7c90980f27006daa55.tar.bz2
wireshark-425e7406d2db5c28e1814d7c90980f27006daa55.zip
When opening tap windows, we don't need to search the tap_list again. It
has been done when processing the -z command line option. svn path=/trunk/; revision=6602
Diffstat (limited to 'gtk/main.c')
-rw-r--r--gtk/main.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 71bb2b0467..2311cc04e6 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.274 2002/11/10 11:36:39 oabad Exp $
+ * $Id: main.c,v 1.275 2002/11/10 11:41:45 oabad Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1410,7 +1410,7 @@ main(int argc, char *argv[])
#endif
gint desk_x, desk_y;
gboolean prefs_write_needed = FALSE;
- ethereal_tap_list *tli;
+ ethereal_tap_list *tli = NULL;
gchar *tap_opt = NULL;
#define OPTSTRING_INIT "a:b:B:c:f:hi:klm:nN:o:pP:Qr:R:Ss:t:T:w:vz:"
@@ -2134,13 +2134,8 @@ main(int argc, char *argv[])
set_menus_for_capture_file(FALSE);
/* open tap windows after creating the main window to avoid GTK warnings */
- if (tap_opt) {
- for(tli=tap_list;tli;tli=tli->next){
- if(!strncmp(tli->cmd,tap_opt,strlen(tli->cmd))){
- (*tli->func)(tap_opt);
- break;
- }
- }
+ if (tap_opt && tli) {
+ (*tli->func)(tap_opt);
g_free(tap_opt);
}