diff options
author | Sebastien Tandel <sebastien@tandel.be> | 2007-04-13 20:59:20 +0000 |
---|---|---|
committer | Sebastien Tandel <sebastien@tandel.be> | 2007-04-13 20:59:20 +0000 |
commit | 2371ad2eb062f71c71e2a11954d361e4df7a94cc (patch) | |
tree | 55892c3ea425a10171d643c5c2995bbb76073387 | |
parent | be81a9cabbd461456835c0f397c90fad9e494573 (diff) |
fix gcc warning about qualifier types (const) which are discarded when arriving
at the pcap interface.
svn path=/trunk/; revision=21417
-rw-r--r-- | capture-pcap-util.c | 2 | ||||
-rw-r--r-- | capture-pcap-util.h | 2 | ||||
-rw-r--r-- | capture_loop.c | 2 | ||||
-rw-r--r-- | capture_loop.h | 2 | ||||
-rw-r--r-- | gtk/capture_dlg.c | 5 |
5 files changed, 7 insertions, 6 deletions
diff --git a/capture-pcap-util.c b/capture-pcap-util.c index 2a5ae50bcf..e19ff4c590 100644 --- a/capture-pcap-util.c +++ b/capture-pcap-util.c @@ -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; diff --git a/capture-pcap-util.h b/capture-pcap-util.h index 5f824135d7..545231704d 100644 --- a/capture-pcap-util.h +++ b/capture-pcap-util.h @@ -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 */ diff --git a/capture_loop.c b/capture_loop.c index dfcecaa600..f045bf5a59 100644 --- a/capture_loop.c +++ b/capture_loop.c @@ -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; diff --git a/capture_loop.h b/capture_loop.h index 907e0c6ff3..bd2d3d82c9 100644 --- a/capture_loop.h +++ b/capture_loop.h @@ -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, diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 65b897a861..656340866d 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -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; |