ipv6: fix up no-duplicates logic in nm_ip6_config_add_nameserver

This commit is contained in:
Dan Winship 2009-08-17 15:24:29 -04:00
parent b62702d337
commit 80d48837ce

View file

@ -204,7 +204,7 @@ void nm_ip6_config_add_nameserver (NMIP6Config *config, const struct in6_addr *n
/* No dupes */
nameservers = (struct in6_addr *)priv->nameservers->data;
for (i = 0; i < priv->nameservers->len; i++) {
g_return_if_fail (memcmp (nameserver, &nameservers[i], sizeof (struct in6_addr)) == 0);
g_return_if_fail (memcmp (nameserver, &nameservers[i], sizeof (struct in6_addr)) != 0);
}
g_array_append_val (priv->nameservers, *nameserver);