summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpdate/ntpdate.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpdate/ntpdate.c')
-rw-r--r--contrib/ntp/ntpdate/ntpdate.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/ntp/ntpdate/ntpdate.c b/contrib/ntp/ntpdate/ntpdate.c
index 9831929..a427160 100644
--- a/contrib/ntp/ntpdate/ntpdate.c
+++ b/contrib/ntp/ntpdate/ntpdate.c
@@ -561,8 +561,8 @@ ntpdatemain (
nfound = poll(rdfdes, (unsigned int)nbsock, timeout.tv_sec * 1000);
#else
- nfound = select(maxfd, &rdfdes, (fd_set *)0,
- (fd_set *)0, &timeout);
+ nfound = select(maxfd, &rdfdes, NULL, NULL,
+ &timeout);
#endif
if (nfound > 0)
input_handler();
@@ -696,7 +696,7 @@ transmit(
* If not, just timestamp it and send it away.
*/
if (sys_authenticate) {
- int len;
+ size_t len;
xpkt.exten[0] = htonl(sys_authkey);
get_systime(&server->xmt);
@@ -808,11 +808,11 @@ receive(
printf("receive: rpkt keyid=%ld sys_authkey=%ld decrypt=%ld\n",
(long int)ntohl(rpkt->exten[0]), (long int)sys_authkey,
(long int)authdecrypt(sys_authkey, (u_int32 *)rpkt,
- LEN_PKT_NOMAC, (int)(rbufp->recv_length - LEN_PKT_NOMAC)));
+ LEN_PKT_NOMAC, (size_t)(rbufp->recv_length - LEN_PKT_NOMAC)));
if (has_mac && ntohl(rpkt->exten[0]) == sys_authkey &&
authdecrypt(sys_authkey, (u_int32 *)rpkt, LEN_PKT_NOMAC,
- (int)(rbufp->recv_length - LEN_PKT_NOMAC)))
+ (size_t)(rbufp->recv_length - LEN_PKT_NOMAC)))
is_authentic = 1;
if (debug)
printf("receive: authentication %s\n",
@@ -1888,7 +1888,7 @@ input_handler(void)
#else
fd_set fds;
#endif
- int fdc = 0;
+ SOCKET fdc = 0;
/*
* Do a poll to see if we have data
@@ -1912,7 +1912,7 @@ input_handler(void)
#else
fds = fdmask;
- n = select(maxfd, &fds, (fd_set *)0, (fd_set *)0, &tvzero);
+ n = select(maxfd, &fds, NULL, NULL, &tvzero);
/*
* Determine which socket received data
OpenPOWER on IntegriCloud