svn rev #25735: trunk/src/lib/rpc/

epeisach@MIT.EDU epeisach at MIT.EDU
Tue Mar 6 05:48:00 EST 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25735
Commit By: epeisach
Log Message:
Use GETSOCKNAME_ARG3_TYPE to prevent warning in type incompatibility.
Fix a cast to prvent signed/unsigned warning.




Changed Files:
U   trunk/src/lib/rpc/svc_udp.c
Modified: trunk/src/lib/rpc/svc_udp.c
===================================================================
--- trunk/src/lib/rpc/svc_udp.c	2012-03-05 23:40:01 UTC (rev 25734)
+++ trunk/src/lib/rpc/svc_udp.c	2012-03-06 10:48:00 UTC (rev 25735)
@@ -55,6 +55,10 @@
 #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 @@
 	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 @@
 	    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);



More information about the cvs-krb5 mailing list