Minor code fix in log.c and getcountrybyaddr test functions