$NetBSD: patch-ad,v 1.1 2008/02/06 23:27:03 heinz Exp $ - test for success of _GeoIP_seek_record(). 0 is a valid return value. http://sourceforge.net/tracker/index.php?func=detail&aid=1888390&group_id=66844&atid=515957 --- libGeoIP/GeoIP.c.orig 2007-11-25 04:27:25.000000000 +0100 +++ libGeoIP/GeoIP.c @@ -707,8 +707,8 @@ int GeoIP_id_by_name (GeoIP* gi, const c } if (!(ipnum = _GeoIP_lookupaddress(name))) return 0; - ret = _GeoIP_seek_record(gi, ipnum) - COUNTRY_BEGIN; - return ret; + ret = _GeoIP_seek_record(gi, ipnum); + return (ret != 0) ? ret - COUNTRY_BEGIN : 0 ; }