summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/libntp/machines.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/libntp/machines.c')
-rw-r--r--contrib/ntp/libntp/machines.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/contrib/ntp/libntp/machines.c b/contrib/ntp/libntp/machines.c
index bbcfd54..a3dcf2f 100644
--- a/contrib/ntp/libntp/machines.c
+++ b/contrib/ntp/libntp/machines.c
@@ -13,10 +13,6 @@
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -195,7 +191,7 @@ getpass(const char * prompt)
fprintf(stderr, "%s", prompt);
fflush(stderr);
#endif
- for (i=0; i<sizeof(password)-1 && ((c=_getch())!='\n'); i++) {
+ for (i=0; i<sizeof(password)-1 && ((c=_getch())!='\n' && c!='\r'); i++) {
password[i] = (char) c;
}
password[i] = '\0';
OpenPOWER on IntegriCloud