From 825bae1e50157fd6d273044883a94e75466c4966 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 19 Jul 2001 20:41:30 +0000 Subject: [PATCH] * auth.h: AUTH ah_private structure element changed to void * * clnt.h: CLIENT cl_private structure element changed to type void *. * svc.h: SVCXRPT elements xp_p1 and xp_p2 changed to void * from caddr_t. * svc_udp.c: su_cache element of svcudp_data from caddr_t to void *. * clnt_tcp.c, svc_tcp.c (writetcp, readtcp): Cleanup alignment warning in casts. * types.hin (mem_alloc): Do not cast type of malloc to char *. * xdr.h: Change type of x_private of XDR from caddr_t to void *. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13620 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/rpc/ChangeLog | 20 +++++++++++++++++++- src/lib/rpc/auth.h | 2 +- src/lib/rpc/clnt.h | 2 +- src/lib/rpc/clnt_tcp.c | 4 ++-- src/lib/rpc/svc.h | 4 ++-- src/lib/rpc/svc_auth.h | 2 +- src/lib/rpc/svc_tcp.c | 4 ++-- src/lib/rpc/svc_udp.c | 2 +- src/lib/rpc/types.hin | 2 +- src/lib/rpc/xdr.h | 2 +- 10 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index bc5c27bf3..92c9c9a07 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,21 @@ +2001-07-19 Ezra Peisach + + * auth.h: AUTH ah_private structure element changed to void *. + + * clnt.h: CLIENT cl_private structure element changed to type void *. + + * svc.h: SVCXRPT elements xp_p1 and xp_p2 changed to void * from + caddr_t. + + * svc_udp.c: su_cache element of svcudp_data from caddr_t to void *. + + * clnt_tcp.c, svc_tcp.c (writetcp, readtcp): Cleanup alignment + warning in casts. + + * types.hin (mem_alloc): Do not cast type of malloc to char *. + + * xdr.h: Change type of x_private of XDR from caddr_t to void *. + 2001-07-09 Ezra Peisach * pmap_rmt.c, svc.c, svc_simple.c, svc_udp.c, svc_tcp.c, @@ -32,7 +50,7 @@ OTW transfer of gids. * clnt_tcp.c, svc_tcp.c: Change writetcp and readtcp to take char - * as first argument to be compatible with xdrrec_create. + as first argument to be compatible with xdrrec_create. * xdr.c (xdr_opaque): Cast argument in call to XDR_GETBYTES. diff --git a/src/lib/rpc/auth.h b/src/lib/rpc/auth.h index 8c2bb58af..4055e04fd 100644 --- a/src/lib/rpc/auth.h +++ b/src/lib/rpc/auth.h @@ -114,7 +114,7 @@ typedef struct __rpc_auth { int (*ah_unwrap)(struct __rpc_auth *, XDR *, xdrproc_t, caddr_t); } *ah_ops; - caddr_t ah_private; + void *ah_private; } AUTH; diff --git a/src/lib/rpc/clnt.h b/src/lib/rpc/clnt.h index ccdbe1c22..93acdd6f6 100644 --- a/src/lib/rpc/clnt.h +++ b/src/lib/rpc/clnt.h @@ -132,7 +132,7 @@ typedef struct __rpc_client { bool_t (*cl_control)(struct __rpc_client *, int, void *); } *cl_ops; - caddr_t cl_private; /* private stuff */ + void *cl_private; /* private stuff */ } CLIENT; diff --git a/src/lib/rpc/clnt_tcp.c b/src/lib/rpc/clnt_tcp.c index 1201e7e99..00e4e51c9 100644 --- a/src/lib/rpc/clnt_tcp.c +++ b/src/lib/rpc/clnt_tcp.c @@ -421,7 +421,7 @@ readtcp(ctptr, buf, len) caddr_t buf; register int len; { - register struct ct_data *ct = (struct ct_data *)ctptr; + register struct ct_data *ct = (struct ct_data *)(void *)ctptr; #ifdef FD_SETSIZE fd_set mask; fd_set readfds; @@ -478,7 +478,7 @@ writetcp(ctptr, buf, len) caddr_t buf; int len; { - struct ct_data *ct = (struct ct_data *)ctptr; + struct ct_data *ct = (struct ct_data *)(void *)ctptr; register int i, cnt; for (cnt = len; cnt > 0; cnt -= i, buf += i) { diff --git a/src/lib/rpc/svc.h b/src/lib/rpc/svc.h index efbbefc0a..46223bbfb 100644 --- a/src/lib/rpc/svc.h +++ b/src/lib/rpc/svc.h @@ -92,8 +92,8 @@ typedef struct __rpc_svcxprt { struct sockaddr_in xp_raddr; /* remote address */ struct opaque_auth xp_verf; /* raw response verifier */ SVCAUTH *xp_auth; /* auth flavor of current req */ - caddr_t xp_p1; /* private */ - caddr_t xp_p2; /* private */ + void *xp_p1; /* private */ + void *xp_p2; /* private */ int xp_laddrlen; /* lenght of local address */ struct sockaddr_in xp_laddr; /* local address */ } SVCXPRT; diff --git a/src/lib/rpc/svc_auth.h b/src/lib/rpc/svc_auth.h index 174c945f3..5f79fdab3 100644 --- a/src/lib/rpc/svc_auth.h +++ b/src/lib/rpc/svc_auth.h @@ -46,7 +46,7 @@ typedef struct __rpc_svc_auth { int (*svc_ah_unwrap)(struct __rpc_svc_auth *, XDR *, xdrproc_t, caddr_t); } *svc_ah_ops; - caddr_t svc_ah_private; + void * svc_ah_private; } SVCAUTH; extern SVCAUTH svc_auth_any; diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c index 371d059cd..771827b22 100644 --- a/src/lib/rpc/svc_tcp.c +++ b/src/lib/rpc/svc_tcp.c @@ -313,7 +313,7 @@ readtcp(xprtptr, buf, len) caddr_t buf; register int len; { - register SVCXPRT *xprt = (SVCXPRT *) xprtptr; + register SVCXPRT *xprt = (SVCXPRT *)(void *)xprtptr; register int sock = xprt->xp_sock; #ifdef FD_SETSIZE fd_set mask; @@ -357,7 +357,7 @@ writetcp(xprtptr, buf, len) caddr_t buf; int len; { - register SVCXPRT *xprt = (SVCXPRT *) xprtptr; + register SVCXPRT *xprt = (SVCXPRT *)(void *) xprtptr; register int i, cnt; for (cnt = len; cnt > 0; cnt -= i, buf += i) { diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c index 9aea69c18..21b5c8f06 100644 --- a/src/lib/rpc/svc_udp.c +++ b/src/lib/rpc/svc_udp.c @@ -84,7 +84,7 @@ struct svcudp_data { rpc_u_int32 su_xid; /* transaction id */ XDR su_xdrs; /* XDR handle */ char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */ - char * su_cache; /* cached data, NULL if no cache */ + void * su_cache; /* cached data, NULL if no cache */ }; #define su_data(xprt) ((struct svcudp_data *)(xprt->xp_p2)) diff --git a/src/lib/rpc/types.hin b/src/lib/rpc/types.hin index 8722759cc..1012d17df 100644 --- a/src/lib/rpc/types.hin +++ b/src/lib/rpc/types.hin @@ -62,7 +62,7 @@ typedef unsigned long rpc_u_int32; #endif @STDLIB_INCLUDE@ -#define mem_alloc(bsize) (char *) malloc(bsize) +#define mem_alloc(bsize) malloc(bsize) #define mem_free(ptr, bsize) free(ptr) #ifndef makedev /* ie, we haven't already included it */ diff --git a/src/lib/rpc/xdr.h b/src/lib/rpc/xdr.h index f4b50f959..fe6551d6f 100644 --- a/src/lib/rpc/xdr.h +++ b/src/lib/rpc/xdr.h @@ -147,7 +147,7 @@ typedef struct __xdr_s { void (*x_destroy)(struct __xdr_s *); } *x_ops; caddr_t x_public; /* users' data */ - caddr_t x_private; /* pointer to private data */ + void * x_private; /* pointer to private data */ caddr_t x_base; /* private used for position info */ int x_handy; /* extra private word */ } XDR; -- 2.26.2