diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-09-06 18:35:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-09-06 18:35:13 +0000 |
commit | bf3ef4a5d5889b762ba9743d44769f699e017e16 (patch) | |
tree | fe248fabb92557f313b861f0970c4818261d16ce | |
parent | 69c2bb09342a39c06cee4a393cb24345bb692aec (diff) |
use socklen_t where needed; henning pvalchev ok
-rw-r--r-- | lib/libc/net/rcmd.c | 4 | ||||
-rw-r--r-- | lib/libc/net/res_send.c | 6 | ||||
-rw-r--r-- | lib/libc/rpc/bindresvport.c | 6 | ||||
-rw-r--r-- | lib/libc/rpc/clnt_udp.c | 4 | ||||
-rw-r--r-- | lib/libc/rpc/pmap_rmt.c | 5 | ||||
-rw-r--r-- | lib/libc/rpc/svc_tcp.c | 6 | ||||
-rw-r--r-- | lib/libc/rpc/svc_udp.c | 4 |
7 files changed, 18 insertions, 17 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index be68c599d8c..d3d2d751b5e 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rcmd.c,v 1.43 2002/05/24 21:22:37 deraadt Exp $"; +static char *rcsid = "$OpenBSD: rcmd.c,v 1.44 2002/09/06 18:35:12 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -216,7 +216,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af) } else { char num[8]; int s2 = rresvport_af(&lport, af), s3; - int len = sizeof(from); + socklen_t len = sizeof(from); int fdssize = howmany(MAX(s, s2)+1, NFDBITS) * sizeof(fd_mask); if (s2 < 0) diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c index 81bf23ba9ff..b043e7c9fb7 100644 --- a/lib/libc/net/res_send.c +++ b/lib/libc/net/res_send.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send.c,v 1.11 2002/02/16 21:27:23 millert Exp $ */ +/* $OpenBSD: res_send.c,v 1.12 2002/09/06 18:35:12 deraadt Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -64,7 +64,7 @@ static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_send.c,v 1.11 2002/02/16 21:27:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: res_send.c,v 1.12 2002/09/06 18:35:12 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -579,7 +579,7 @@ read_len: struct timeval timeout; fd_set *dsmaskp; struct sockaddr_storage from; - int fromlen; + socklen_t fromlen; if ((s < 0) || vc || (af != nsap->sa_family)) { if (vc) diff --git a/lib/libc/rpc/bindresvport.c b/lib/libc/rpc/bindresvport.c index 02a8857af9c..53a1339206d 100644 --- a/lib/libc/rpc/bindresvport.c +++ b/lib/libc/rpc/bindresvport.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: bindresvport.c,v 1.13 2000/01/26 03:43:21 deraadt Exp $"; +static char *rcsid = "$OpenBSD: bindresvport.c,v 1.14 2002/09/06 18:35:12 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -68,7 +68,7 @@ bindresvport_sa(sd, sa) struct sockaddr_in6 *sin6; int proto, portrange, portlow; u_int16_t port; - int salen; + socklen_t salen; if (sa == NULL) { salen = sizeof(myaddr); @@ -104,7 +104,7 @@ bindresvport_sa(sd, sa) sa->sa_len = salen; if (port == 0) { - int oldlen = sizeof(old); + socklen_t oldlen = sizeof(old); error = getsockopt(sd, proto, portrange, &old, &oldlen); if (error < 0) diff --git a/lib/libc/rpc/clnt_udp.c b/lib/libc/rpc/clnt_udp.c index 5a5f9c3a038..782078d5aa8 100644 --- a/lib/libc/rpc/clnt_udp.c +++ b/lib/libc/rpc/clnt_udp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_udp.c,v 1.18 2002/06/03 12:04:08 deraadt Exp $"; +static char *rcsid = "$OpenBSD: clnt_udp.c,v 1.19 2002/09/06 18:35:12 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -220,7 +220,7 @@ clntudp_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout) XDR *xdrs; int outlen; int inlen; - int fromlen; + socklen_t fromlen; fd_set *fds, readfds; struct sockaddr_in from; struct rpc_msg reply_msg; diff --git a/lib/libc/rpc/pmap_rmt.c b/lib/libc/rpc/pmap_rmt.c index 0183696dd44..2e36d1263ea 100644 --- a/lib/libc/rpc/pmap_rmt.c +++ b/lib/libc/rpc/pmap_rmt.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.19 2001/09/15 13:51:01 deraadt Exp $"; +static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.20 2002/09/06 18:35:12 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -229,7 +229,8 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) AUTH *unix_auth = authunix_create_default(); XDR xdr_stream; XDR *xdrs = &xdr_stream; - int outlen, inlen, fromlen, nets; + int outlen, inlen, nets; + socklen_t fromlen; int sock = -1; int on = 1; fd_set *fds = NULL, readfds; diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index ad27be3888c..9b6aca17a8d 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.21 2002/01/02 23:00:10 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.22 2002/09/06 18:35:12 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -133,7 +133,7 @@ svctcp_create(sock, sendsize, recvsize) SVCXPRT *xprt; struct tcp_rendezvous *r; struct sockaddr_in addr; - int len = sizeof(struct sockaddr_in); + socklen_t len = sizeof(struct sockaddr_in); if (sock == RPC_ANYSOCK) { if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { @@ -250,7 +250,7 @@ rendezvous_request(xprt) int sock; struct tcp_rendezvous *r; struct sockaddr_in addr; - int len; + socklen_t len; r = (struct tcp_rendezvous *)xprt->xp_p1; again: diff --git a/lib/libc/rpc/svc_udp.c b/lib/libc/rpc/svc_udp.c index bf456045543..3ba6d5d1544 100644 --- a/lib/libc/rpc/svc_udp.c +++ b/lib/libc/rpc/svc_udp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_udp.c,v 1.11 2002/02/16 21:27:24 millert Exp $"; +static char *rcsid = "$OpenBSD: svc_udp.c,v 1.12 2002/09/06 18:35:12 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -103,7 +103,7 @@ svcudp_bufcreate(sock, sendsz, recvsz) SVCXPRT *xprt; struct svcudp_data *su; struct sockaddr_in addr; - int len = sizeof(struct sockaddr_in); + socklen_t len = sizeof(struct sockaddr_in); if (sock == RPC_ANYSOCK) { if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { |