Only show users country if its not unknown

This commit is contained in:
TingPing
2013-09-25 17:16:47 -04:00
parent 7bc3317eeb
commit c7a00a4aba
2 changed files with 11 additions and 9 deletions

View File

@@ -1253,7 +1253,7 @@ country (char *hostname)
domain_t *dom;
if (!hostname || !*hostname || isdigit ((unsigned char) hostname[strlen (hostname) - 1]))
return _("Unknown");
return NULL;
if ((p = strrchr (hostname, '.')))
p++;
else
@@ -1263,7 +1263,7 @@ country (char *hostname)
sizeof (domain_t), country_compare);
if (!dom)
return _("Unknown");
return NULL;
return _(dom->country);
}