upnp-wrapper: remove pointless `#if` guards

These functions are inline and will be removed by the compiler anyway if
unused. The #if guards add unecessary compexity.
This commit is contained in:
Alaric Senat 2021-06-16 12:00:03 +02:00 committed by Jean-Baptiste Kempf
parent 36ca47ff57
commit aaef25ce7a
1 changed files with 2 additions and 11 deletions

View File

@ -208,8 +208,6 @@ inline IP_ADAPTER_ADDRESSES* ListAdapters()
return addresses;
}
#ifdef UPNP_ENABLE_IPV6
inline char* getPreferedAdapter()
{
IP_ADAPTER_ADDRESSES *p_adapter, *addresses;
@ -239,8 +237,6 @@ inline char* getPreferedAdapter()
return NULL;
}
#else
inline char *getIpv4ForMulticast()
{
IP_ADAPTER_UNICAST_ADDRESS *p_best_ip = NULL;
@ -327,11 +323,8 @@ done:
free(addresses);
return NULL;
}
#endif /* UPNP_ENABLE_IPV6 */
#else /* _WIN32 */
#ifdef UPNP_ENABLE_IPV6
#ifdef __APPLE__
#include <TargetConditionals.h>
@ -406,7 +399,6 @@ inline char *getPreferedAdapter()
}
#endif
#else
#ifdef __APPLE__
@ -461,7 +453,6 @@ static char *getIpv4ForMulticast()
#endif
#endif
#endif /* _WIN32 */
#endif /* UPNP_WRAPPER_H */
#endif