-/*
- * getcanon.c - Print the canonical name of a host, default to localhost.
+/* getcanon.c - Print the canonical name of a host, default to localhost.
*
* This code is Copyright (c) 2012, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
hints.ai_family = AF_UNSPEC;
if (getaddrinfo(hostname, NULL, &hints, &res)) {
- printf("%s\n", hostname);
+ puts(hostname);
return 1;
}
- printf("%s\n", res->ai_canonname);
+ puts(res->ai_canonname);
return 0;
}