From df8c3bcbb5ed0cfe5723e80ec3625a9dd8d002a7 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Tue, 5 Jul 2016 23:14:42 +0200 Subject: [PATCH] Fix checking aliases. --- dns/fqdn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/fqdn.c b/dns/fqdn.c index cce7930..8cc2069 100644 --- a/dns/fqdn.c +++ b/dns/fqdn.c @@ -63,7 +63,7 @@ int main(int argc, char **argv) { fprintf(stderr, "Canonical name doesn't contain a dot.\n"); fprintf(stderr, "Please shoot the administrator of this box.\n"); fprintf(stderr, "In the mean time I try to find a suitable alias.\n"); - for (a = he->h_aliases; !found && a; a++) { + for (a = he->h_aliases; !found && *a; a++) { if (strchr(*a, '.')) { printf("%s\n", *a); found = 1;