From 1cbd9c795532468727fb8cff850a044ec64d925e Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Tue, 16 Sep 2014 20:28:19 +0000 Subject: Fix compilation in weird cases Change-Id: I6c52ea9954a4c96f525e6d064dbf3fc2c71bea68 Reviewed-on: https://code.wireshark.org/review/4136 Reviewed-by: Guy Harris --- caputils/capture-pcap-util-unix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'caputils') diff --git a/caputils/capture-pcap-util-unix.c b/caputils/capture-pcap-util-unix.c index 66404500ce..8aae100c33 100644 --- a/caputils/capture-pcap-util-unix.c +++ b/caputils/capture-pcap-util-unix.c @@ -118,8 +118,8 @@ struct search_user_data { static void search_for_if_cb(gpointer data, gpointer user_data) { - struct search_user_data *search_user_data = user_data; - if_info_t *if_info = data; + struct search_user_data *search_user_data = (struct search_user_data*)user_data; + if_info_t *if_info = (if_info_t *)data; if (strcmp(if_info->name, search_user_data->name) == 0) search_user_data->if_info = if_info; @@ -159,7 +159,7 @@ get_interface_list(int *err, char **err_str) lastlen = 0; len = 100 * sizeof(struct ifreq); for ( ; ; ) { - buf = g_malloc(len); + buf = (char *)g_malloc(len); ifc.ifc_len = len; ifc.ifc_buf = buf; memset (buf, 0, len); -- cgit v1.2.1