Removed uiplib_ip6addrconv() from IPv4 builds.

While it may very well be beneficial to have explict uiplib_ip4addrconv() and uiplib_ip6addrconv() available for IPv6 builds I'm having a hard time to see the point in uiplib_ip6addrconv() for IPv4 builds.

Unrelated to the above the dispatching of uiplib_ipaddrconv() to either uiplib_ip4addrconv() or uiplib_ip6addrconv() can be accomplished by the C preprocessor only thus avoiding the size/speed overhead of an additional callframe.
This commit is contained in:
Oliver Schmidt 2013-02-03 23:04:41 +01:00
parent a3ae531ce7
commit 29391ef9ae
2 changed files with 7 additions and 12 deletions

View file

@ -66,7 +66,11 @@
* \retval 0 If the IP address could not be parsed.
* \retval Non-zero If the IP address was parsed.
*/
CCIF int uiplib_ipaddrconv(const char *addrstr, uip_ipaddr_t *addr);
#if UIP_CONF_IPV6
#define uiplib_ipaddrconv uiplib_ip6addrconv
#else /* UIP_CONF_IPV6 */
#define uiplib_ipaddrconv uiplib_ip4addrconv
#endif /* UIP_CONF_IPV6 */
CCIF int uiplib_ip4addrconv(const char *addrstr, uip_ip4addr_t *addr);
CCIF int uiplib_ip6addrconv(const char *addrstr, uip_ip6addr_t *addr);