Commit f87aa5cc authored by Pekka Pessi's avatar Pekka Pessi

bnf.c: removed 64-bit warning in host_cmp()

darcs-hash:20061120235813-65a35-fb8e61ab9f94f1d0b84272b31d005296d4fd66a5.gz
parent 70c7be62
......@@ -900,9 +900,12 @@ int host_cmp(char const *a, char const *b)
blen = convert_ip_address(b, b6, &bsize);
if (alen > 0 && blen > 0) {
if (asize != bsize)
return asize - bsize;
return memcmp(a6, b6, asize);
if (asize < bsize)
return -1;
else if (asize > bsize)
return 1;
else
return memcmp(a6, b6, asize);
}
else {
return strcasecmp(a, b);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment