[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix deadcode warning in get_interface_addresses_raw().
commit 7117959199a230cc7f1684794b8b13235b5f2715
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Feb 16 15:28:33 2015 -0500
Fix deadcode warning in get_interface_addresses_raw().
CID 1268070
---
src/common/address.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/common/address.c b/src/common/address.c
index d8202e1..42a116a 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1470,18 +1470,21 @@ get_interface_addresses_ioctl(int severity)
STATIC smartlist_t *
get_interface_addresses_raw(int severity)
{
+ smartlist_t *result = NULL;
#if defined(HAVE_IFADDRS_TO_SMARTLIST)
- return get_interface_addresses_ifaddrs(severity);
+ if ((result = get_interface_addresses_ifaddrs(severity)))
+ return result;
#endif
#if defined(HAVE_IP_ADAPTER_TO_SMARTLIST)
- return get_interface_addresses_win32(severity);
+ if ((result = get_interface_addresses_win32(severity)))
+ return result;
#endif
#if defined(HAVE_IFCONF_TO_SMARTLIST)
- return get_interface_addresses_ioctl(severity);
-#else
+ if ((result = get_interface_addresses_ioctl(severity)))
+ return result;
+#endif
(void) severity;
return NULL;
-#endif
}
/** Return true iff <b>a</b> is a multicast address. */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits