diff options
author | roberto <roberto@FreeBSD.org> | 2008-08-22 15:58:00 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2008-08-22 15:58:00 +0000 |
commit | b85c7169a740b2edf0106ad59fdaa1b0160f823c (patch) | |
tree | 2b9fb7f64eacb322e95695e412c923e97ba33e88 /contrib/ntp/libntp/machines.c | |
parent | 1d197cfe9feac6bc29537d8e53c30b6435937b95 (diff) | |
parent | 7a6072eb585696f8856cd498c3fd194cf49f14c6 (diff) | |
download | FreeBSD-src-b85c7169a740b2edf0106ad59fdaa1b0160f823c.zip FreeBSD-src-b85c7169a740b2edf0106ad59fdaa1b0160f823c.tar.gz |
Merge ntpd & friends 4.2.4p5 from vendor/ntp/dist into head. Next commit
will update usr.sbin/ntp to match this.
MFC after: 2 weeks
Diffstat (limited to 'contrib/ntp/libntp/machines.c')
-rw-r--r-- | contrib/ntp/libntp/machines.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/ntp/libntp/machines.c b/contrib/ntp/libntp/machines.c index 9e318bf..c8e4e07 100644 --- a/contrib/ntp/libntp/machines.c +++ b/contrib/ntp/libntp/machines.c @@ -454,6 +454,7 @@ ntp_set_tod( */ adjtv.tv_sec = adjtv.tv_usec = 0; adjtime(&adjtv, NULL); + errno = 0; rc = SETTIMEOFDAY(tvp, tzp); #ifdef DEBUG if (debug) { @@ -468,6 +469,7 @@ ntp_set_tod( long tp = tvp->tv_sec; set_tod_using = "stime"; + errno = 0; rc = stime(&tp); /* lie as bad as SysVR4 */ #ifdef DEBUG if (debug) { @@ -498,10 +500,10 @@ getpass(const char * prompt) { int c, i; static char password[32]; -#ifdef DEBUG + fprintf(stderr, "%s", prompt); fflush(stderr); -#endif + for (i=0; i<sizeof(password)-1 && ((c=_getch())!='\n' && c!='\r'); i++) { password[i] = (char) c; } |