int -> socklen_t
This commit is contained in:
parent
28fbffc215
commit
6312884315
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bindresvport.c,v 1.14 1999/01/20 11:37:35 lukem Exp $ */
|
||||
/* $NetBSD: bindresvport.c,v 1.15 1999/05/03 15:32:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
|
@ -35,7 +35,7 @@
|
|||
static char *sccsid = "@(#)bindresvport.c 1.8 88/02/08 SMI";
|
||||
static char *sccsid = "@(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC";
|
||||
#else
|
||||
__RCSID("$NetBSD: bindresvport.c,v 1.14 1999/01/20 11:37:35 lukem Exp $");
|
||||
__RCSID("$NetBSD: bindresvport.c,v 1.15 1999/05/03 15:32:13 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -70,7 +70,7 @@ bindresvport(sd, sin)
|
|||
{
|
||||
int res, old;
|
||||
struct sockaddr_in myaddr;
|
||||
int sinlen = sizeof(struct sockaddr_in);
|
||||
socklen_t sinlen = sizeof(struct sockaddr_in);
|
||||
|
||||
if (sin == NULL) {
|
||||
sin = &myaddr;
|
||||
|
@ -83,7 +83,8 @@ bindresvport(sd, sin)
|
|||
}
|
||||
|
||||
if (sin->sin_port == 0) {
|
||||
int on, oldlen = sizeof(old);
|
||||
int on;
|
||||
socklen_t oldlen = sizeof(old);
|
||||
|
||||
res = getsockopt(sd, IPPROTO_IP, IP_PORTRANGE, &old, &oldlen);
|
||||
if (res < 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clnt_udp.c,v 1.17 1999/03/25 01:16:11 lukem Exp $ */
|
||||
/* $NetBSD: clnt_udp.c,v 1.18 1999/05/03 15:32:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
|
@ -35,7 +35,7 @@
|
|||
static char *sccsid = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
|
||||
static char *sccsid = "@(#)clnt_udp.c 2.2 88/08/01 4.0 RPCSRC";
|
||||
#else
|
||||
__RCSID("$NetBSD: clnt_udp.c,v 1.17 1999/03/25 01:16:11 lukem Exp $");
|
||||
__RCSID("$NetBSD: clnt_udp.c,v 1.18 1999/05/03 15:32:13 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -248,7 +248,7 @@ clntudp_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
|
|||
XDR *xdrs;
|
||||
size_t outlen;
|
||||
int inlen;
|
||||
int fromlen;
|
||||
socklen_t fromlen;
|
||||
struct pollfd fd;
|
||||
int milliseconds = (int)((cu->cu_wait.tv_sec * 1000) +
|
||||
(cu->cu_wait.tv_usec / 1000));
|
||||
|
@ -284,7 +284,7 @@ call_again:
|
|||
|
||||
send_again:
|
||||
if (sendto(cu->cu_sock, cu->cu_outbuf, outlen, 0,
|
||||
(struct sockaddr *)(void *)&(cu->cu_raddr), cu->cu_rlen)
|
||||
(struct sockaddr *)(void *)&(cu->cu_raddr), (socklen_t)cu->cu_rlen)
|
||||
!= outlen) {
|
||||
cu->cu_error.re_errno = errno;
|
||||
return (cu->cu_error.re_status = RPC_CANTSEND);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap_rmt.c,v 1.20 1999/03/25 01:16:11 lukem Exp $ */
|
||||
/* $NetBSD: pmap_rmt.c,v 1.21 1999/05/03 15:32:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
|
@ -35,7 +35,7 @@
|
|||
static char *sccsid = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
|
||||
static char *sccsid = "@(#)pmap_rmt.c 2.2 88/08/01 4.0 RPCSRC";
|
||||
#else
|
||||
__RCSID("$NetBSD: pmap_rmt.c,v 1.20 1999/03/25 01:16:11 lukem Exp $");
|
||||
__RCSID("$NetBSD: pmap_rmt.c,v 1.21 1999/05/03 15:32:13 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -255,7 +255,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 inlen, fromlen, nets;
|
||||
int inlen, nets;
|
||||
socklen_t fromlen;
|
||||
size_t outlen;
|
||||
int sock;
|
||||
int on = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svc_tcp.c,v 1.22 1999/03/25 01:16:11 lukem Exp $ */
|
||||
/* $NetBSD: svc_tcp.c,v 1.23 1999/05/03 15:32:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
|
@ -35,7 +35,7 @@
|
|||
static char *sccsid = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
|
||||
static char *sccsid = "@(#)svc_tcp.c 2.2 88/08/01 4.0 RPCSRC";
|
||||
#else
|
||||
__RCSID("$NetBSD: svc_tcp.c,v 1.22 1999/03/25 01:16:11 lukem Exp $");
|
||||
__RCSID("$NetBSD: svc_tcp.c,v 1.23 1999/05/03 15:32:13 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -148,7 +148,7 @@ svctcp_create(sock, sendsize, recvsize)
|
|||
SVCXPRT *xprt;
|
||||
struct tcp_rendezvous *r = NULL;
|
||||
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) {
|
||||
|
@ -259,7 +259,7 @@ rendezvous_request(xprt, msg)
|
|||
int sock;
|
||||
struct tcp_rendezvous *r;
|
||||
struct sockaddr_in addr;
|
||||
int len;
|
||||
socklen_t len;
|
||||
|
||||
r = (struct tcp_rendezvous *)xprt->xp_p1;
|
||||
again:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svc_udp.c,v 1.17 1999/03/25 01:16:11 lukem Exp $ */
|
||||
/* $NetBSD: svc_udp.c,v 1.18 1999/05/03 15:32:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
|
@ -35,7 +35,7 @@
|
|||
static char *sccsid = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
|
||||
static char *sccsid = "@(#)svc_udp.c 2.2 88/07/29 4.0 RPCSRC";
|
||||
#else
|
||||
__RCSID("$NetBSD: svc_udp.c,v 1.17 1999/03/25 01:16:11 lukem Exp $");
|
||||
__RCSID("$NetBSD: svc_udp.c,v 1.18 1999/05/03 15:32:13 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -122,7 +122,7 @@ svcudp_bufcreate(sock, sendsz, recvsz)
|
|||
SVCXPRT *xprt = NULL;
|
||||
struct svcudp_data *su = NULL;
|
||||
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) {
|
||||
|
@ -204,16 +204,17 @@ svcudp_recv(xprt, msg)
|
|||
int rlen;
|
||||
char *reply;
|
||||
u_long replylen;
|
||||
socklen_t alen;
|
||||
|
||||
again:
|
||||
xprt->xp_addrlen = sizeof(struct sockaddr_in);
|
||||
rlen = recvfrom(xprt->xp_sock, rpc_buffer(xprt), su->su_iosz,
|
||||
0, (struct sockaddr *)(void *)&(xprt->xp_raddr),
|
||||
&(xprt->xp_addrlen));
|
||||
0, (struct sockaddr *)(void *)&(xprt->xp_raddr), &alen);
|
||||
if (rlen == -1 && errno == EINTR)
|
||||
goto again;
|
||||
if (rlen == -1 || rlen < 4*sizeof(u_int32_t))
|
||||
return (FALSE);
|
||||
xprt->xp_addrlen = alen;
|
||||
xdrs->x_op = XDR_DECODE;
|
||||
XDR_SETPOS(xdrs, 0);
|
||||
if (! xdr_callmsg(xdrs, msg))
|
||||
|
@ -224,7 +225,7 @@ svcudp_recv(xprt, msg)
|
|||
(void) sendto(xprt->xp_sock, reply,
|
||||
(u_int32_t)replylen, 0,
|
||||
(struct sockaddr *)(void *)&xprt->xp_raddr,
|
||||
xprt->xp_addrlen);
|
||||
(socklen_t)xprt->xp_addrlen);
|
||||
return (TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +249,7 @@ svcudp_reply(xprt, msg)
|
|||
slen = XDR_GETPOS(xdrs);
|
||||
if (sendto(xprt->xp_sock, rpc_buffer(xprt), slen, 0,
|
||||
(struct sockaddr *)(void *)&(xprt->xp_raddr),
|
||||
xprt->xp_addrlen) == slen) {
|
||||
(socklen_t)xprt->xp_addrlen) == slen) {
|
||||
stat = TRUE;
|
||||
if (su->su_cache) {
|
||||
cache_set(xprt, (u_long) slen);
|
||||
|
|
Loading…
Reference in New Issue