diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-16 15:28:33 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-16 15:28:36 -0500 |
commit | 7117959199a230cc7f1684794b8b13235b5f2715 (patch) | |
tree | b54820dd44ac6480977440049348bd0eef1a1dd4 | |
parent | 2af7bc5b46b23717f30d412bd630e56edde77a3b (diff) | |
download | tor-7117959199a230cc7f1684794b8b13235b5f2715.tar.gz tor-7117959199a230cc7f1684794b8b13235b5f2715.zip |
Fix deadcode warning in get_interface_addresses_raw().
CID 1268070
-rw-r--r-- | src/common/address.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/common/address.c b/src/common/address.c index d8202e17a5..42a116a91e 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. */ |