summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ntp/ntpdate/ntpdate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/ntp/ntpdate/ntpdate.c b/contrib/ntp/ntpdate/ntpdate.c
index 398d194..b2cbe7e 100644
--- a/contrib/ntp/ntpdate/ntpdate.c
+++ b/contrib/ntp/ntpdate/ntpdate.c
@@ -1339,7 +1339,10 @@ addserver(
hints.ai_family = ai_fam_templ;
hints.ai_socktype = SOCK_DGRAM;
- printf("Looking for host %s and service %s\n", serv, service);
+#ifdef DEBUG
+ if (debug)
+ printf("Looking for host %s and service %s\n", serv, service);
+#endif
error = getaddrinfo(serv, service, &hints, &addrResult);
if (error != 0) {
@@ -1347,9 +1350,11 @@ addserver(
msyslog(LOG_ERR, "can't find host %s\n", serv);
return;
}
- else {
+#ifdef DEBUG
+ else if (debug) {
fprintf(stderr, "host found : %s\n", stohost((struct sockaddr_storage*)addrResult->ai_addr));
}
+#endif
server = (struct server *)emalloc(sizeof(struct server));
memset((char *)server, 0, sizeof(struct server));
OpenPOWER on IntegriCloud