diff options
author | roberto <roberto@FreeBSD.org> | 2004-12-06 14:33:29 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2004-12-06 14:33:29 +0000 |
commit | 930ad3d9dccfb6cee0f223e316f4dd24c3404251 (patch) | |
tree | 4945e74d8d0fee3a2c02f4d74c1ec5636ab14e87 /contrib/ntp | |
parent | 3522c0a675ab27e985e27aa29d0075ec8e698388 (diff) | |
parent | 25b467e3d94f1aca3ea93de947c097f663d1a44e (diff) | |
download | FreeBSD-src-930ad3d9dccfb6cee0f223e316f4dd24c3404251.zip FreeBSD-src-930ad3d9dccfb6cee0f223e316f4dd24c3404251.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r138451,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/ntp')
-rw-r--r-- | contrib/ntp/ntpdate/ntpdate.c | 9 |
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)); |