fix gcc warning about qualifier types (const) which are discarded when arriving
authorstandel <standel@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 13 Apr 2007 20:59:20 +0000 (20:59 +0000)
committerstandel <standel@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 13 Apr 2007 20:59:20 +0000 (20:59 +0000)
at the pcap interface.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21417 f5534014-38df-0310-8fa8-9805f1628bb7

capture-pcap-util.c
capture-pcap-util.h
capture_loop.c
capture_loop.h
gtk/capture_dlg.c

index 2a5ae50bcf048d8f11f274f6c9ab70f9dbed3d82..e19ff4c59010304fb1d6bb6bf9efda5806c535f3 100644 (file)
@@ -354,7 +354,7 @@ create_data_link_info(int dlt)
 }
 
 GList *
-get_pcap_linktype_list(const char *devname, char **err_str)
+get_pcap_linktype_list(char *devname, char **err_str)
 {
        GList *linktype_list = NULL;
        pcap_t *pch;
index 5f824135d7e4c1f2dad47fedbd0fe327c6d15795..545231704d2e6349013c5a870188ddb93375d40d 100644 (file)
@@ -85,7 +85,7 @@ typedef struct {
        char    *description;   /* descriptive name from wiretap e.g. "Ethernet", NULL if unknown */
 } data_link_info_t;
 
-GList *get_pcap_linktype_list(const char *devname, char **err_str);
+GList *get_pcap_linktype_list(char *devname, char **err_str);
 void free_pcap_linktype_list(GList *linktype_list);
 
 /* get/set the link type of an interface */
index dfcecaa600b97c17aa4705633fcb6e747215cdf1..f045bf5a5935aa1e07ed9698faece37ad1714cb2 100644 (file)
@@ -821,7 +821,7 @@ static void capture_loop_close_input(loop_data *ld) {
 
 
 /* init the capture filter */
-initfilter_status_t capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, const gchar * iface, gchar * cfilter) {
+initfilter_status_t capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, gchar * iface, gchar * cfilter) {
   bpf_u_int32 netnum, netmask;
   gchar       lookup_net_err_str[PCAP_ERRBUF_SIZE];
   struct bpf_program fcode;
index 907e0c6ff3b2c54f872078ad99c7f4da64bea60b..bd2d3d82c971f6ef126a5f66041799b0ca6a0250 100644 (file)
@@ -153,7 +153,7 @@ typedef enum {
 } initfilter_status_t;
 
 extern initfilter_status_t
-capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, const gchar * iface, gchar * cfilter);
+capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, gchar * iface, gchar * cfilter);
 
 int
 capture_loop_dispatch(capture_options *capture_opts _U_, loop_data *ld,
index 65b897a861894f5a158098433ab23ada08412341..656340866d236f2bce9db9c60825a6aec8b52921 100644 (file)
@@ -172,7 +172,7 @@ set_link_type_list(GtkWidget *linktype_om, GtkWidget *entry)
 {
   gchar *entry_text;
   gchar *if_text;
-  const gchar *if_name;
+  gchar *if_name;
   GList *if_list;
   GList *if_entry;
   if_info_t *if_info;
@@ -201,7 +201,7 @@ set_link_type_list(GtkWidget *linktype_om, GtkWidget *entry)
   dl_hdr_menu= lt_menu;
   entry_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
   if_text = g_strstrip(entry_text);
-  if_name = get_if_name(if_text);
+  if_name = g_strdup(get_if_name(if_text));
 
 #ifdef HAVE_AIRPCAP
   /* is it an airpcap interface??? */
@@ -282,6 +282,7 @@ set_link_type_list(GtkWidget *linktype_om, GtkWidget *entry)
     }
   }
   g_free(entry_text);
+  g_free(if_name);
   num_supported_link_types = 0;
   for (lt_entry = lt_list; lt_entry != NULL; lt_entry = g_list_next(lt_entry)) {
     data_link_info = lt_entry->data;