From: Jozsef Kadlecsik Date: Wed, 26 Jan 2011 20:49:30 +0000 (+0100) Subject: Resolving IP addresses did not work at listing/saving sets, fixed. X-Git-Tag: v6.0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16cfb322781f4555a2a385a3a9df8edbe5f58fe9;p=thirdparty%2Fipset.git Resolving IP addresses did not work at listing/saving sets, fixed. --- diff --git a/lib/print.c b/lib/print.c index b045d171..5284b0ab 100644 --- a/lib/print.c +++ b/lib/print.c @@ -230,7 +230,7 @@ ipset_print_ip(char *buf, unsigned int len, D("CIDR: %u", cidr); } else cidr = family == AF_INET6 ? 128 : 32; - flags = env & (1 << IPSET_ENV_RESOLVE) ? 0 : NI_NUMERICHOST; + flags = (env & IPSET_ENV_RESOLVE) ? 0 : NI_NUMERICHOST; ip = ipset_data_get(data, opt); assert(ip); @@ -297,7 +297,7 @@ ipset_print_ipaddr(char *buf, unsigned int len, cidr = *(const uint8_t *) ipset_data_get(data, cidropt); else cidr = family == AF_INET6 ? 128 : 32; - flags = env & (1 << IPSET_ENV_RESOLVE) ? 0 : NI_NUMERICHOST; + flags = (env & IPSET_ENV_RESOLVE) ? 0 : NI_NUMERICHOST; ip = ipset_data_get(data, opt); assert(ip);