summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2004-12-06 14:33:29 +0000
committerroberto <roberto@FreeBSD.org>2004-12-06 14:33:29 +0000
commit25b467e3d94f1aca3ea93de947c097f663d1a44e (patch)
treeb9debbc6683fffa41fd811a978edf57781285743 /contrib
parent515bd10243a3f90af80df8024ade33571df042c3 (diff)
downloadFreeBSD-src-25b467e3d94f1aca3ea93de947c097f663d1a44e.zip
FreeBSD-src-25b467e3d94f1aca3ea93de947c097f663d1a44e.tar.gz
Merge from the main BK repository for ntp: put two midly annoying messages
under #ifdef DEBUG. Merge of revision 1.45 by H. Stenn. Done on the vendor branch to minimise future imports. Reminded by: obrien
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