diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-09-06 19:28:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-09-06 19:28:02 +0000 |
commit | d08fd972b2d56b38a0257db7d2995c1760b537b3 (patch) | |
tree | be4dbc1505d28d47d47eff1e7c6dbc8393251ef0 | |
parent | 22a2d496c25fb678e4d53b515430ffcfeee93ae1 (diff) |
socklen_t; henning ok
-rw-r--r-- | usr.sbin/timed/timed/measure.c | 4 | ||||
-rw-r--r-- | usr.sbin/timed/timed/readmsg.c | 7 | ||||
-rw-r--r-- | usr.sbin/timed/timedc/cmds.c | 15 |
3 files changed, 14 insertions, 12 deletions
diff --git a/usr.sbin/timed/timed/measure.c b/usr.sbin/timed/timed/measure.c index 9f2cb1c77f8..18c8d77f60e 100644 --- a/usr.sbin/timed/timed/measure.c +++ b/usr.sbin/timed/timed/measure.c @@ -1,4 +1,4 @@ -/* $OpenBSD: measure.c,v 1.7 2002/06/18 00:40:31 ericj Exp $ */ +/* $OpenBSD: measure.c,v 1.8 2002/09/06 19:28:01 deraadt Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -68,7 +68,7 @@ measure(u_long maxmsec, /* wait this many msec at most */ struct sockaddr_in *addr, int print) /* print complaints on stderr */ { - int length; + socklen_t length; int measure_status; int rcvcount, trials; int cc, count; diff --git a/usr.sbin/timed/timed/readmsg.c b/usr.sbin/timed/timed/readmsg.c index 0ab208881f0..57333076337 100644 --- a/usr.sbin/timed/timed/readmsg.c +++ b/usr.sbin/timed/timed/readmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readmsg.c,v 1.10 2002/06/18 00:40:31 ericj Exp $ */ +/* $OpenBSD: readmsg.c,v 1.11 2002/09/06 19:28:01 deraadt Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -76,6 +76,7 @@ readmsg(int type, char *machfrom, struct timeval *intvl, struct netinfo *netfrom) { int length; + socklen_t salength; fd_set ready; static struct tsplist *head = &msgslist; static struct tsplist *tail = &msgslist; @@ -201,9 +202,9 @@ again: return(0); continue; } - length = sizeof(from); + salength = sizeof(from); if ((n = recvfrom(sock, (char *)&msgin, sizeof(struct tsp), 0, - (struct sockaddr*)&from, &length)) < 0) { + (struct sockaddr *)&from, &salength)) < 0) { syslog(LOG_ERR, "recvfrom: %m"); exit(1); } diff --git a/usr.sbin/timed/timedc/cmds.c b/usr.sbin/timed/timedc/cmds.c index fb79d13124b..7bfc87a5e12 100644 --- a/usr.sbin/timed/timedc/cmds.c +++ b/usr.sbin/timed/timedc/cmds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmds.c,v 1.14 2002/05/17 00:21:19 deraadt Exp $ */ +/* $OpenBSD: cmds.c,v 1.15 2002/09/06 19:28:01 deraadt Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)cmds.c 5.1 (Berkeley) 5/11/93"; #endif /* not lint */ #ifdef sgi -#ident "$Revision: 1.14 $" +#ident "$Revision: 1.15 $" #endif #include "timedc.h" @@ -93,8 +93,8 @@ daydiff(char *hostname) struct timeval now; struct pollfd pfd; unsigned long sec; - int i, fromlen; - int trials; + int i, trials; + socklen_t fromlen; for (trials = 0; trials < 10; trials++) { /* ask for the time */ @@ -295,7 +295,8 @@ msite(int argc, char *argv[]) { struct sockaddr_in dest, from; struct servent *srvp; - int i, length, cc; + int i, cc; + socklen_t length; struct pollfd pfd; struct tsp msg; char *tgtname; @@ -482,8 +483,8 @@ tracing(int argc, char *argv[]) struct tsp msg; struct servent *srvp; struct pollfd pfd; - int cc, length; - int onflag; + int cc, onflag; + socklen_t length; if (argc != 2) { printf("Usage: tracing { on | off }\n"); |