diff options
author | Ezra Peisach <epeisach@mit.edu> | 2012-03-06 10:48:00 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2012-03-06 10:48:00 +0000 |
commit | 1ff64358f4e251b21c506c8614b293d0e0139d8f (patch) | |
tree | e3de11aec47756ca1463aff7121e5e169260da79 | |
parent | 93889f1341eeb7aec2e994673594f610309c1795 (diff) | |
download | krb5-1ff64358f4e251b21c506c8614b293d0e0139d8f.tar.gz krb5-1ff64358f4e251b21c506c8614b293d0e0139d8f.tar.xz krb5-1ff64358f4e251b21c506c8614b293d0e0139d8f.zip |
Use GETSOCKNAME_ARG3_TYPE to prevent warning in type incompatibility.
Fix a cast to prvent signed/unsigned warning.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25735 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/rpc/svc_udp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c index 7c37aeb0e..a38f35d7d 100644 --- a/src/lib/rpc/svc_udp.c +++ b/src/lib/rpc/svc_udp.c @@ -55,6 +55,10 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; #include "k5-platform.h" +#ifndef GETSOCKNAME_ARG3_TYPE +#define GETSOCKNAME_ARG3_TYPE int +#endif + #define rpc_buffer(xprt) ((xprt)->xp_p1) #ifndef MAX #define MAX(a, b) ((a > b) ? a : b) @@ -115,7 +119,7 @@ svcudp_bufcreate( register SVCXPRT *xprt; register struct svcudp_data *su; struct sockaddr_in addr; - int len = sizeof(struct sockaddr_in); + GETSOCKNAME_ARG3_TYPE len = sizeof(struct sockaddr_in); if (sock == RPC_ANYSOCK) { if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { @@ -216,7 +220,7 @@ svcudp_recv( 0, (struct sockaddr *)&(xprt->xp_raddr), &(xprt->xp_addrlen)); if (rlen == -1 && errno == EINTR) goto again; - if (rlen < (int) 4*sizeof(uint32_t)) + if (rlen < (int) (4*sizeof(uint32_t))) return (FALSE); xdrs->x_op = XDR_DECODE; XDR_SETPOS(xdrs, 0); |