diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-19 22:00:09 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-19 22:00:09 +0000 |
commit | 11d553e9ce692fe32413c0786090c18fb4424c1c (patch) | |
tree | a051fa1d251aea58d0e638c5dbbdd8f06e05cf0b | |
parent | e62e5e3b2562c64cc1e445d8174a7b835bc03f0e (diff) |
Convert the arguments to if_list_comparator_alph() to if_info_t *'s
early on, and use the converted versions.
#if 0 out the error dialog for CANT_GET_AIRPCAP_INTERFACE_LIST, rather
than commenting it out - it's a bit easier to un-out the code, and you
don't have to worry about whether there's a comment in the stuff being
xxx-outed.
svn path=/trunk/; revision=21838
-rw-r--r-- | gtk/capture_if_dlg.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gtk/capture_if_dlg.c b/gtk/capture_if_dlg.c index 2d11d586c0..37eb732303 100644 --- a/gtk/capture_if_dlg.c +++ b/gtk/capture_if_dlg.c @@ -394,10 +394,12 @@ combo_channel_new(void) /* * Sorts the Interface List in alphabetical order */ -gint if_list_comparator_alph (const void *first, const void *second){ - if (first != NULL && ((if_info_t *)first)->description != NULL && - second != NULL && ((if_info_t *)second)->description != NULL) { - return g_strcasecmp(((if_info_t *)first)->description, ((if_info_t *)second)->description); +gint if_list_comparator_alph (const void *first_arg, const void *second_arg){ + const if_info_t *first = first_arg, *second = second_arg; + + if (first != NULL && first->description != NULL && + second != NULL && second->description != NULL) { + return g_strcasecmp(first->description, second->description); } else { return 0; } @@ -474,7 +476,10 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) update_decryption_mode_list(decryption_cm); if (airpcap_if_list == NULL && err == CANT_GET_AIRPCAP_INTERFACE_LIST) { - /* simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_str); XXX - Do we need to show an error here? */ +#if 0 + /* XXX - Do we need to show an error here? */ + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_str); +#endif g_free(err_str); } |