aboutsummaryrefslogtreecommitdiffstats
path: root/capture_ui_utils.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2007-01-21 23:45:36 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2007-01-21 23:45:36 +0000
commita77c32bbd28a4bf9ff3e49c7766d1327b86d41db (patch)
tree5512510787af52895ceb934713d75bf182fa3033 /capture_ui_utils.c
parentc02e067a72dd0f37f65a7da9fc8a632e8ed71bfa (diff)
Have the routines to get interface lists take a pointer to a "gchar *"
as an argument, and, on an error, if they have an error message, have them set that "gchar *" to point to a g_malloc()ed string containing the error message, rather than taking a pointer to a buffer for that message as an argument. That's more like what's done in Wiretap, and doesn't impose an upper limit on the lengths of those error messages. If that pointer is null, don't allocate the message string and return it. Have that error message already have the "cant_get" processing applied to it, so nobody other than those routines need to call the "cant_get" routines to process the error messages. Have get_airpcap_interface_list() explicitly set "*err" to the appropriate error code. Clean up indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20521 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_ui_utils.c')
-rw-r--r--capture_ui_utils.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/capture_ui_utils.c b/capture_ui_utils.c
index a684e16805..67e659219a 100644
--- a/capture_ui_utils.c
+++ b/capture_ui_utils.c
@@ -109,7 +109,6 @@ get_interface_descriptive_name(const char *if_name)
GList *if_entry;
if_info_t *if_info;
int err;
- char err_buf[CAPTURE_PCAP_ERRBUF_SIZE];
/* Do we have a user-supplied description? */
descr = capture_dev_user_descr_find(if_name);
@@ -120,7 +119,7 @@ get_interface_descriptive_name(const char *if_name)
/* No, we don't have a user-supplied description; did we get
one from the OS or libpcap? */
descr = NULL;
- if_list = get_interface_list(&err, err_buf);
+ if_list = get_interface_list(&err, NULL);
if (if_list != NULL) {
if_entry = if_list;
do {