// [PROTOCOL:]IP[%INTERFACE][:PORT]
//
// PROTOCOL = tcp or udp
-// IP = IPv4 or IPv6 IP or hostname, optionaly enclosed in [] (required for IPv6)
+// IP = IPv4 or IPv6 IP or hostname, optionally enclosed in [] (required for IPv6)
// INTERFACE = for IPv6 only, the network interface to use
// PORT = port number or service name
int ai_err = getaddrinfo(host, service, &hints, &ai_head);
if (ai_err != 0) {
- error("Cannot resolve host '%s', port '%s': %s\n", host, service, gai_strerror(ai_err));
+ error("Cannot resolve host '%s', port '%s': %s", host, service, gai_strerror(ai_err));
return -1;
}