aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/ip_addr.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-03 18:46:32 (GMT)
committerJouni Malinen <j@w1.fi>2009-01-03 18:46:32 (GMT)
commit5306f43fc3967da86728d28a6bc53f1b74dc3ae6 (patch)
tree6acadd262ade7094d529d62159fda3fb711eff69 /src/utils/ip_addr.c
parentd953d9ab80262b85469e090b4e8124b8a9331057 (diff)
downloadhostap-5306f43fc3967da86728d28a6bc53f1b74dc3ae6.zip
hostap-5306f43fc3967da86728d28a6bc53f1b74dc3ae6.tar.gz
hostap-5306f43fc3967da86728d28a6bc53f1b74dc3ae6.tar.bz2
Fixed sparse warnings about integer vs. pointer use
The configuration parsing functions seemed to have worked fine before, but these were real bugs even if they did not show up in practice. hostapd_ip_diff() was broken for IPv6 addresses (overwrote address and always returned 1.
Diffstat (limited to 'src/utils/ip_addr.c')
-rw-r--r--src/utils/ip_addr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils/ip_addr.c b/src/utils/ip_addr.c
index d40a871..158fd57 100644
--- a/src/utils/ip_addr.c
+++ b/src/utils/ip_addr.c
@@ -53,8 +53,7 @@ int hostapd_ip_diff(struct hostapd_ip_addr *a, struct hostapd_ip_addr *b)
break;
#ifdef CONFIG_IPV6
case AF_INET6:
- if (os_memcpy(&a->u.v6, &b->u.v6, sizeof(a->u.v6))
- != 0)
+ if (os_memcmp(&a->u.v6, &b->u.v6, sizeof(a->u.v6)) != 0)
return 1;
break;
#endif /* CONFIG_IPV6 */