aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>2004-12-06 14:33:29 +0000
committerOllivier Robert <roberto@FreeBSD.org>2004-12-06 14:33:29 +0000
commitb9bb0f5d00084ab6452843002797f92db4806239 (patch)
treeb9debbc6683fffa41fd811a978edf57781285743 /contrib
parent5e91a9b70066bc508b15c00dfc060d5261757edf (diff)
downloadsrc-b9bb0f5d00084ab6452843002797f92db4806239.tar.gz
src-b9bb0f5d00084ab6452843002797f92db4806239.zip
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
Notes
Notes: svn path=/vendor/ntp/dist/; revision=138451
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 398d19466038..b2cbe7e7e356 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));