summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/rpc/auth_time.c4
-rw-r--r--lib/libc/rpc/clnt_dg.c12
-rw-r--r--lib/libc/rpc/clnt_raw.c12
-rw-r--r--lib/libc/rpc/clnt_vc.c32
-rw-r--r--lib/libc/rpc/crypt_client.c2
-rw-r--r--lib/libc/rpc/key_call.c42
-rw-r--r--lib/libc/rpc/rpc_soc.c6
-rw-r--r--lib/libc/rpc/svc.c6
-rw-r--r--lib/libc/rpc/svc_dg.c10
-rw-r--r--lib/libc/rpc/svc_raw.c8
-rw-r--r--lib/libc/rpc/svc_vc.c36
-rw-r--r--lib/libc/xdr/xdr.c6
-rw-r--r--lib/libc/xdr/xdr_rec.c10
-rw-r--r--lib/libc/yp/xdryp.c10
-rw-r--r--lib/libc/yp/yplib.c43
15 files changed, 122 insertions, 117 deletions
diff --git a/lib/libc/rpc/auth_time.c b/lib/libc/rpc/auth_time.c
index 264b368..c35bde8 100644
--- a/lib/libc/rpc/auth_time.c
+++ b/lib/libc/rpc/auth_time.c
@@ -343,8 +343,8 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
tv.tv_sec = 5;
tv.tv_usec = 0;
time_valid = 0;
- status = clnt_call(clnt, RPCBPROC_GETTIME, xdr_void, NULL,
- xdr_u_long, (char *)&thetime, tv);
+ status = clnt_call(clnt, RPCBPROC_GETTIME, (xdrproc_t)xdr_void, NULL,
+ (xdrproc_t)xdr_u_long, &thetime, tv);
/*
* The only error we check for is anything but success. In
* fact we could have seen PROGMISMATCH if talking to a 4.1
diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c
index 7c13cdd..5779c35 100644
--- a/lib/libc/rpc/clnt_dg.c
+++ b/lib/libc/rpc/clnt_dg.c
@@ -68,10 +68,10 @@ __FBSDID("$FreeBSD$");
static struct clnt_ops *clnt_dg_ops(void);
static bool_t time_not_ok(struct timeval *);
-static enum clnt_stat clnt_dg_call(CLIENT *, rpcproc_t, xdrproc_t, caddr_t,
- xdrproc_t, caddr_t, struct timeval);
+static enum clnt_stat clnt_dg_call(CLIENT *, rpcproc_t, xdrproc_t, void *,
+ xdrproc_t, void *, struct timeval);
static void clnt_dg_geterr(CLIENT *, struct rpc_err *);
-static bool_t clnt_dg_freeres(CLIENT *, xdrproc_t, caddr_t);
+static bool_t clnt_dg_freeres(CLIENT *, xdrproc_t, void *);
static void clnt_dg_abort(CLIENT *);
static bool_t clnt_dg_control(CLIENT *, u_int, char *);
static void clnt_dg_destroy(CLIENT *);
@@ -294,9 +294,9 @@ clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
CLIENT *cl; /* client handle */
rpcproc_t proc; /* procedure number */
xdrproc_t xargs; /* xdr routine for args */
- caddr_t argsp; /* pointer to args */
+ void *argsp; /* pointer to args */
xdrproc_t xresults; /* xdr routine for results */
- caddr_t resultsp; /* pointer to results */
+ void *resultsp; /* pointer to results */
struct timeval utimeout; /* seconds to wait before giving up */
{
struct cu_data *cu = (struct cu_data *)cl->cl_private;
@@ -594,7 +594,7 @@ static bool_t
clnt_dg_freeres(cl, xdr_res, res_ptr)
CLIENT *cl;
xdrproc_t xdr_res;
- caddr_t res_ptr;
+ void *res_ptr;
{
struct cu_data *cu = (struct cu_data *)cl->cl_private;
XDR *xdrs = &(cu->cu_outxdrs);
diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c
index b591bf6..ed3aecd 100644
--- a/lib/libc/rpc/clnt_raw.c
+++ b/lib/libc/rpc/clnt_raw.c
@@ -76,10 +76,10 @@ static struct clntraw_private {
u_int mcnt;
} *clntraw_private;
-static enum clnt_stat clnt_raw_call(CLIENT *, rpcproc_t, xdrproc_t, caddr_t,
- xdrproc_t, caddr_t, struct timeval);
+static enum clnt_stat clnt_raw_call(CLIENT *, rpcproc_t, xdrproc_t, void *,
+ xdrproc_t, void *, struct timeval);
static void clnt_raw_geterr(CLIENT *, struct rpc_err *);
-static bool_t clnt_raw_freeres(CLIENT *, xdrproc_t, caddr_t);
+static bool_t clnt_raw_freeres(CLIENT *, xdrproc_t, void *);
static void clnt_raw_abort(CLIENT *);
static bool_t clnt_raw_control(CLIENT *, u_int, char *);
static void clnt_raw_destroy(CLIENT *);
@@ -145,9 +145,9 @@ clnt_raw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
CLIENT *h;
rpcproc_t proc;
xdrproc_t xargs;
- caddr_t argsp;
+ void *argsp;
xdrproc_t xresults;
- caddr_t resultsp;
+ void *resultsp;
struct timeval timeout;
{
struct clntraw_private *clp = clntraw_private;
@@ -251,7 +251,7 @@ static bool_t
clnt_raw_freeres(cl, xdr_res, res_ptr)
CLIENT *cl;
xdrproc_t xdr_res;
- caddr_t res_ptr;
+ void *res_ptr;
{
struct clntraw_private *clp = clntraw_private;
XDR *xdrs = &clp->xdr_stream;
diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c
index c166ec0..60f5996 100644
--- a/lib/libc/rpc/clnt_vc.c
+++ b/lib/libc/rpc/clnt_vc.c
@@ -87,17 +87,17 @@ struct cmessage {
struct cmsgcred cmcred;
};
-static enum clnt_stat clnt_vc_call(CLIENT *, rpcproc_t, xdrproc_t, caddr_t,
- xdrproc_t, caddr_t, struct timeval);
+static enum clnt_stat clnt_vc_call(CLIENT *, rpcproc_t, xdrproc_t, void *,
+ xdrproc_t, void *, struct timeval);
static void clnt_vc_geterr(CLIENT *, struct rpc_err *);
-static bool_t clnt_vc_freeres(CLIENT *, xdrproc_t, caddr_t);
+static bool_t clnt_vc_freeres(CLIENT *, xdrproc_t, void *);
static void clnt_vc_abort(CLIENT *);
static bool_t clnt_vc_control(CLIENT *, u_int, char *);
static void clnt_vc_destroy(CLIENT *);
static struct clnt_ops *clnt_vc_ops(void);
static bool_t time_not_ok(struct timeval *);
-static int read_vc(caddr_t, caddr_t, int);
-static int write_vc(caddr_t, caddr_t, int);
+static int read_vc(void *, void *, int);
+static int write_vc(void *, void *, int);
static int __msgwrite(int, void *, size_t);
static int __msgread(int, void *, size_t);
@@ -304,10 +304,10 @@ err:
if (ct) {
if (ct->ct_addr.len)
mem_free(ct->ct_addr.buf, ct->ct_addr.len);
- mem_free((caddr_t)ct, sizeof (struct ct_data));
+ mem_free(ct, sizeof (struct ct_data));
}
if (cl)
- mem_free((caddr_t)cl, sizeof (CLIENT));
+ mem_free(cl, sizeof (CLIENT));
}
return ((CLIENT *)NULL);
}
@@ -317,9 +317,9 @@ clnt_vc_call(cl, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
CLIENT *cl;
rpcproc_t proc;
xdrproc_t xdr_args;
- caddr_t args_ptr;
+ void *args_ptr;
xdrproc_t xdr_results;
- caddr_t results_ptr;
+ void *results_ptr;
struct timeval timeout;
{
struct ct_data *ct = (struct ct_data *) cl->cl_private;
@@ -457,7 +457,7 @@ static bool_t
clnt_vc_freeres(cl, xdr_res, res_ptr)
CLIENT *cl;
xdrproc_t xdr_res;
- caddr_t res_ptr;
+ void *res_ptr;
{
struct ct_data *ct;
XDR *xdrs;
@@ -660,13 +660,13 @@ clnt_vc_destroy(cl)
*/
static int
read_vc(ctp, buf, len)
- caddr_t ctp;
- caddr_t buf;
+ void *ctp;
+ void *buf;
int len;
{
struct sockaddr sa;
socklen_t sal;
- struct ct_data *ct = (struct ct_data *)(void *)ctp;
+ struct ct_data *ct = (struct ct_data *)ctp;
struct pollfd fd;
int milliseconds = (int)((ct->ct_wait.tv_sec * 1000) +
(ct->ct_wait.tv_usec / 1000));
@@ -717,13 +717,13 @@ read_vc(ctp, buf, len)
static int
write_vc(ctp, buf, len)
- caddr_t ctp;
- caddr_t buf;
+ void *ctp;
+ void *buf;
int len;
{
struct sockaddr sa;
socklen_t sal;
- struct ct_data *ct = (struct ct_data *)(void *)ctp;
+ struct ct_data *ct = (struct ct_data *)ctp;
int i, cnt;
sal = sizeof(sa);
diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c
index 7f3cb36..652a49b 100644
--- a/lib/libc/rpc/crypt_client.c
+++ b/lib/libc/rpc/crypt_client.c
@@ -93,7 +93,7 @@ _des_crypt_call(buf, len, dparms)
bcopy(result_1->des_ivec, dparms->des_ivec, 8);
}
- clnt_freeres(clnt, xdr_desresp, (char *)result_1);
+ clnt_freeres(clnt, (xdrproc_t)xdr_desresp, result_1);
clnt_destroy(clnt);
return(stat);
diff --git a/lib/libc/rpc/key_call.c b/lib/libc/rpc/key_call.c
index f6ca01b..6f9c081 100644
--- a/lib/libc/rpc/key_call.c
+++ b/lib/libc/rpc/key_call.c
@@ -86,7 +86,7 @@ cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
des_block *(*__key_gendes_LOCAL)() = 0;
-static int key_call( u_long, xdrproc_t, char *, xdrproc_t, char * );
+static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *);
int
key_setsecret(secretkey)
@@ -94,8 +94,8 @@ key_setsecret(secretkey)
{
keystatus status;
- if (!key_call((u_long) KEY_SET, xdr_keybuf, (char *) secretkey,
- xdr_keystatus, (char *)&status)) {
+ if (!key_call((u_long) KEY_SET, (xdrproc_t)xdr_keybuf, secretkey,
+ (xdrproc_t)xdr_keystatus, &status)) {
return (-1);
}
if (status != KEY_SUCCESS) {
@@ -119,8 +119,8 @@ key_secretkey_is_set(void)
struct key_netstres kres;
memset((void*)&kres, 0, sizeof (kres));
- if (key_call((u_long) KEY_NET_GET, xdr_void, (char *)NULL,
- xdr_key_netstres, (char *) &kres) &&
+ if (key_call((u_long) KEY_NET_GET, (xdrproc_t)xdr_void, NULL,
+ (xdrproc_t)xdr_key_netstres, &kres) &&
(kres.status == KEY_SUCCESS) &&
(kres.key_netstres_u.knet.st_priv_key[0] != 0)) {
/* avoid leaving secret key in memory */
@@ -142,8 +142,8 @@ key_encryptsession_pk(remotename, remotekey, deskey)
arg.remotename = remotename;
arg.remotekey = *remotekey;
arg.deskey = *deskey;
- if (!key_call((u_long)KEY_ENCRYPT_PK, xdr_cryptkeyarg2, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
+ if (!key_call((u_long)KEY_ENCRYPT_PK, (xdrproc_t)xdr_cryptkeyarg2, &arg,
+ (xdrproc_t)xdr_cryptkeyres, &res)) {
return (-1);
}
if (res.status != KEY_SUCCESS) {
@@ -166,8 +166,8 @@ key_decryptsession_pk(remotename, remotekey, deskey)
arg.remotename = remotename;
arg.remotekey = *remotekey;
arg.deskey = *deskey;
- if (!key_call((u_long)KEY_DECRYPT_PK, xdr_cryptkeyarg2, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
+ if (!key_call((u_long)KEY_DECRYPT_PK, (xdrproc_t)xdr_cryptkeyarg2, &arg,
+ (xdrproc_t)xdr_cryptkeyres, &res)) {
return (-1);
}
if (res.status != KEY_SUCCESS) {
@@ -188,8 +188,8 @@ key_encryptsession(remotename, deskey)
arg.remotename = (char *) remotename;
arg.deskey = *deskey;
- if (!key_call((u_long)KEY_ENCRYPT, xdr_cryptkeyarg, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
+ if (!key_call((u_long)KEY_ENCRYPT, (xdrproc_t)xdr_cryptkeyarg, &arg,
+ (xdrproc_t)xdr_cryptkeyres, &res)) {
return (-1);
}
if (res.status != KEY_SUCCESS) {
@@ -210,8 +210,8 @@ key_decryptsession(remotename, deskey)
arg.remotename = (char *) remotename;
arg.deskey = *deskey;
- if (!key_call((u_long)KEY_DECRYPT, xdr_cryptkeyarg, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
+ if (!key_call((u_long)KEY_DECRYPT, (xdrproc_t)xdr_cryptkeyarg, &arg,
+ (xdrproc_t)xdr_cryptkeyres, &res)) {
return (-1);
}
if (res.status != KEY_SUCCESS) {
@@ -226,8 +226,8 @@ int
key_gendes(key)
des_block *key;
{
- if (!key_call((u_long)KEY_GEN, xdr_void, (char *)NULL,
- xdr_des_block, (char *)key)) {
+ if (!key_call((u_long)KEY_GEN, (xdrproc_t)xdr_void, NULL,
+ (xdrproc_t)xdr_des_block, key)) {
return (-1);
}
return (0);
@@ -240,8 +240,8 @@ struct key_netstarg *arg;
keystatus status;
- if (!key_call((u_long) KEY_NET_PUT, xdr_key_netstarg, (char *) arg,
- xdr_keystatus, (char *) &status)){
+ if (!key_call((u_long) KEY_NET_PUT, (xdrproc_t)xdr_key_netstarg, arg,
+ (xdrproc_t)xdr_keystatus, &status)){
return (-1);
}
@@ -260,8 +260,8 @@ key_get_conv(pkey, deskey)
{
cryptkeyres res;
- if (!key_call((u_long) KEY_GET_CONV, xdr_keybuf, pkey,
- xdr_cryptkeyres, (char *)&res)) {
+ if (!key_call((u_long) KEY_GET_CONV, (xdrproc_t)xdr_keybuf, pkey,
+ (xdrproc_t)xdr_cryptkeyres, &res)) {
return (-1);
}
if (res.status != KEY_SUCCESS) {
@@ -427,9 +427,9 @@ static int
key_call(proc, xdr_arg, arg, xdr_rslt, rslt)
u_long proc;
xdrproc_t xdr_arg;
- char *arg;
+ void *arg;
xdrproc_t xdr_rslt;
- char *rslt;
+ void *rslt;
{
CLIENT *clnt;
struct timeval wait_time;
diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c
index ffb1c76..9a58fc5 100644
--- a/lib/libc/rpc/rpc_soc.c
+++ b/lib/libc/rpc/rpc_soc.c
@@ -182,7 +182,7 @@ clntudp_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz)
if (cl == NULL) {
return (NULL);
}
- (void) CLNT_CONTROL(cl, CLSET_RETRY_TIMEOUT, (char *)(void *)&wait);
+ (void) CLNT_CONTROL(cl, CLSET_RETRY_TIMEOUT, &wait);
return (cl);
}
@@ -394,9 +394,9 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
u_long vers; /* version number */
u_long proc; /* procedure number */
xdrproc_t xargs; /* xdr routine for args */
- caddr_t argsp; /* pointer to args */
+ void *argsp; /* pointer to args */
xdrproc_t xresults; /* xdr routine for results */
- caddr_t resultsp; /* pointer to results */
+ void *resultsp; /* pointer to results */
resultproc_t eachresult; /* call with each result obtained */
{
extern mutex_t tsd_lock;
diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c
index c9d9c07..c4584ed 100644
--- a/lib/libc/rpc/svc.c
+++ b/lib/libc/rpc/svc.c
@@ -360,7 +360,7 @@ bool_t
svc_sendreply(xprt, xdr_results, xdr_location)
SVCXPRT *xprt;
xdrproc_t xdr_results;
- caddr_t xdr_location;
+ void * xdr_location;
{
struct rpc_msg rply;
@@ -443,7 +443,7 @@ __svc_versquiet_on(xprt)
u_long tmp;
tmp = ((u_long) xprt->xp_p3) | SVC_VERSQUIET;
- xprt->xp_p3 = (caddr_t) tmp;
+ xprt->xp_p3 = tmp;
}
void
@@ -453,7 +453,7 @@ __svc_versquiet_off(xprt)
u_long tmp;
tmp = ((u_long) xprt->xp_p3) & ~SVC_VERSQUIET;
- xprt->xp_p3 = (caddr_t) tmp;
+ xprt->xp_p3 = tmp;
}
void
diff --git a/lib/libc/rpc/svc_dg.c b/lib/libc/rpc/svc_dg.c
index cf63e7a..7ff4c59 100644
--- a/lib/libc/rpc/svc_dg.c
+++ b/lib/libc/rpc/svc_dg.c
@@ -74,8 +74,8 @@ static void svc_dg_ops(SVCXPRT *);
static enum xprt_stat svc_dg_stat(SVCXPRT *);
static bool_t svc_dg_recv(SVCXPRT *, struct rpc_msg *);
static bool_t svc_dg_reply(SVCXPRT *, struct rpc_msg *);
-static bool_t svc_dg_getargs(SVCXPRT *, xdrproc_t, caddr_t);
-static bool_t svc_dg_freeargs(SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svc_dg_getargs(SVCXPRT *, xdrproc_t, void *);
+static bool_t svc_dg_freeargs(SVCXPRT *, xdrproc_t, void *);
static void svc_dg_destroy(SVCXPRT *);
static bool_t svc_dg_control(SVCXPRT *, const u_int, void *);
static int cache_get(SVCXPRT *, struct rpc_msg *, char **, size_t *);
@@ -137,7 +137,7 @@ svc_dg_create(fd, sendsize, recvsize)
XDR_DECODE);
su->su_cache = NULL;
xprt->xp_fd = fd;
- xprt->xp_p2 = (caddr_t)(void *)su;
+ xprt->xp_p2 = su;
xprt->xp_verf.oa_base = su->su_verfbody;
svc_dg_ops(xprt);
xprt->xp_rtaddr.maxlen = sizeof (struct sockaddr_storage);
@@ -250,7 +250,7 @@ static bool_t
svc_dg_getargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
- caddr_t args_ptr;
+ void *args_ptr;
{
return (*xdr_args)(&(su_data(xprt)->su_xdrs), args_ptr);
}
@@ -259,7 +259,7 @@ static bool_t
svc_dg_freeargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
- caddr_t args_ptr;
+ void *args_ptr;
{
XDR *xdrs = &(su_data(xprt)->su_xdrs);
diff --git a/lib/libc/rpc/svc_raw.c b/lib/libc/rpc/svc_raw.c
index 96891ee..930c863 100644
--- a/lib/libc/rpc/svc_raw.c
+++ b/lib/libc/rpc/svc_raw.c
@@ -75,8 +75,8 @@ extern mutex_t svcraw_lock;
static enum xprt_stat svc_raw_stat(SVCXPRT *);
static bool_t svc_raw_recv(SVCXPRT *, struct rpc_msg *);
static bool_t svc_raw_reply(SVCXPRT *, struct rpc_msg *);
-static bool_t svc_raw_getargs(SVCXPRT *, xdrproc_t, caddr_t);
-static bool_t svc_raw_freeargs(SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svc_raw_getargs(SVCXPRT *, xdrproc_t, void *);
+static bool_t svc_raw_freeargs(SVCXPRT *, xdrproc_t, void *);
static void svc_raw_destroy(SVCXPRT *);
static void svc_raw_ops(SVCXPRT *);
static bool_t svc_raw_control(SVCXPRT *, const u_int, void *);
@@ -179,7 +179,7 @@ static bool_t
svc_raw_getargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
- caddr_t args_ptr;
+ void *args_ptr;
{
struct svc_raw_private *srp;
@@ -198,7 +198,7 @@ static bool_t
svc_raw_freeargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
- caddr_t args_ptr;
+ void *args_ptr;
{
struct svc_raw_private *srp;
XDR *xdrs;
diff --git a/lib/libc/rpc/svc_vc.c b/lib/libc/rpc/svc_vc.c
index 701c4ff..e6cc187 100644
--- a/lib/libc/rpc/svc_vc.c
+++ b/lib/libc/rpc/svc_vc.c
@@ -77,12 +77,12 @@ static SVCXPRT *makefd_xprt(int, u_int, u_int);
static bool_t rendezvous_request(SVCXPRT *, struct rpc_msg *);
static enum xprt_stat rendezvous_stat(SVCXPRT *);
static void svc_vc_destroy(SVCXPRT *);
-static int read_vc(caddr_t, caddr_t, int);
-static int write_vc(caddr_t, caddr_t, int);
+static int read_vc(void *, void *, int);
+static int write_vc(void *, void *, int);
static enum xprt_stat svc_vc_stat(SVCXPRT *);
static bool_t svc_vc_recv(SVCXPRT *, struct rpc_msg *);
-static bool_t svc_vc_getargs(SVCXPRT *, xdrproc_t, caddr_t);
-static bool_t svc_vc_freeargs(SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svc_vc_getargs(SVCXPRT *, xdrproc_t, void *);
+static bool_t svc_vc_freeargs(SVCXPRT *, xdrproc_t, void *);
static bool_t svc_vc_reply(SVCXPRT *, struct rpc_msg *);
static void svc_vc_rendezvous_ops(SVCXPRT *);
static void svc_vc_ops(SVCXPRT *);
@@ -145,7 +145,7 @@ svc_vc_create(fd, sendsize, recvsize)
goto cleanup_svc_vc_create;
}
xprt->xp_tp = NULL;
- xprt->xp_p1 = (caddr_t)(void *)r;
+ xprt->xp_p1 = r;
xprt->xp_p2 = NULL;
xprt->xp_p3 = NULL;
xprt->xp_verf = _null_auth;
@@ -265,8 +265,8 @@ makefd_xprt(fd, sendsize, recvsize)
}
cd->strm_stat = XPRT_IDLE;
xdrrec_create(&(cd->xdrs), sendsize, recvsize,
- (caddr_t)(void *)xprt, read_vc, write_vc);
- xprt->xp_p1 = (caddr_t)(void *)cd;
+ xprt, read_vc, write_vc);
+ xprt->xp_p1 = cd;
xprt->xp_verf.oa_base = cd->verf_body;
svc_vc_ops(xprt); /* truely deals with calls */
xprt->xp_port = 0; /* this is a connection, not a rendezvouser */
@@ -389,8 +389,8 @@ svc_vc_control(xprt, rq, in)
*/
static int
read_vc(xprtp, buf, len)
- caddr_t xprtp;
- caddr_t buf;
+ void *xprtp;
+ void *buf;
int len;
{
SVCXPRT *xprt;
@@ -400,7 +400,7 @@ read_vc(xprtp, buf, len)
struct sockaddr *sa;
struct cmessage *cm;
- xprt = (SVCXPRT *)(void *)xprtp;
+ xprt = (SVCXPRT *)xprtp;
assert(xprt != NULL);
sock = xprt->xp_fd;
@@ -447,15 +447,15 @@ fatal_err:
*/
static int
write_vc(xprtp, buf, len)
- caddr_t xprtp;
- caddr_t buf;
+ void *xprtp;
+ void *buf;
int len;
{
SVCXPRT *xprt;
int i, cnt;
struct sockaddr *sa;
- xprt = (SVCXPRT *)(void *)xprtp;
+ xprt = (SVCXPRT *)xprtp;
assert(xprt != NULL);
sa = (struct sockaddr *)xprt->xp_rtaddr.buf;
@@ -527,7 +527,7 @@ static bool_t
svc_vc_getargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
- caddr_t args_ptr;
+ void *args_ptr;
{
assert(xprt != NULL);
@@ -540,7 +540,7 @@ static bool_t
svc_vc_freeargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
- caddr_t args_ptr;
+ void *args_ptr;
{
XDR *xdrs;
@@ -613,11 +613,11 @@ svc_vc_rendezvous_ops(xprt)
ops.xp_recv = rendezvous_request;
ops.xp_stat = rendezvous_stat;
ops.xp_getargs =
- (bool_t (*)(SVCXPRT *, xdrproc_t, caddr_t))abort;
+ (bool_t (*)(SVCXPRT *, xdrproc_t, void *))abort;
ops.xp_reply =
(bool_t (*)(SVCXPRT *, struct rpc_msg *))abort;
ops.xp_freeargs =
- (bool_t (*)(SVCXPRT *, xdrproc_t, caddr_t))abort,
+ (bool_t (*)(SVCXPRT *, xdrproc_t, void *))abort,
ops.xp_destroy = svc_vc_destroy;
ops2.xp_control = svc_vc_control;
}
@@ -687,7 +687,7 @@ __msgwrite(sock, buf, cnt)
msg.msg_iovlen = 1;
msg.msg_name = NULL;
msg.msg_namelen = 0;
- msg.msg_control = (caddr_t)&cm;
+ msg.msg_control = &cm;
msg.msg_controllen = sizeof(struct cmessage);
msg.msg_flags = 0;
diff --git a/lib/libc/xdr/xdr.c b/lib/libc/xdr/xdr.c
index fcb1a51..16a8a1a 100644
--- a/lib/libc/xdr/xdr.c
+++ b/lib/libc/xdr/xdr.c
@@ -78,7 +78,7 @@ static const char xdr_zero[BYTES_PER_XDR_UNIT] = { 0, 0, 0, 0 };
void
xdr_free(proc, objp)
xdrproc_t proc;
- char *objp;
+ void *objp;
{
XDR x;
@@ -90,9 +90,7 @@ xdr_free(proc, objp)
* XDR nothing
*/
bool_t
-xdr_void(/* xdrs, addr */)
- /* XDR *xdrs; */
- /* caddr_t addr; */
+xdr_void(void)
{
return (TRUE);
diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c
index 3b85c00..b969d6f 100644
--- a/lib/libc/xdr/xdr_rec.c
+++ b/lib/libc/xdr/xdr_rec.c
@@ -110,7 +110,7 @@ typedef struct rec_strm {
/*
* out-goung bits
*/
- int (*writeit)(char *, char *, int);
+ int (*writeit)(void *, void *, int);
char *out_base; /* output buffer (points to frag header) */
char *out_finger; /* next output position */
char *out_boundry; /* data cannot up to this address */
@@ -119,7 +119,7 @@ typedef struct rec_strm {
/*
* in-coming bits
*/
- int (*readit)(char *, char *, int);
+ int (*readit)(void *, void *, int);
u_long in_size; /* fixed size of the input buffer */
char *in_base;
char *in_finger; /* location of next byte to be had */
@@ -152,11 +152,11 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
XDR *xdrs;
u_int sendsize;
u_int recvsize;
- char *tcp_handle;
+ void *tcp_handle;
/* like read, but pass it a tcp_handle, not sock */
- int (*readit)(char *, char *, int);
+ int (*readit)(void *, void *, int);
/* like write, but pass it a tcp_handle, not sock */
- int (*writeit)(char *, char *, int);
+ int (*writeit)(void *, void *, int);
{
RECSTREAM *rstrm = mem_alloc(sizeof(RECSTREAM));
diff --git a/lib/libc/yp/xdryp.c b/lib/libc/yp/xdryp.c
index 38aa8e2..7aed6ad 100644
--- a/lib/libc/yp/xdryp.c
+++ b/lib/libc/yp/xdryp.c
@@ -69,12 +69,12 @@ xdr_ypresp_all_seq(XDR *xdrs, u_long *objp)
bzero(&out, sizeof out);
while (1) {
if (!xdr_ypresp_all(xdrs, &out)) {
- xdr_free(xdr_ypresp_all, (char *)&out);
+ xdr_free((xdrproc_t)xdr_ypresp_all, &out);
*objp = YP_YPERR;
return (FALSE);
}
if (out.more == 0) {
- xdr_free(xdr_ypresp_all, (char *)&out);
+ xdr_free((xdrproc_t)xdr_ypresp_all, &out);
*objp = YP_NOMORE;
return (TRUE);
}
@@ -89,7 +89,7 @@ xdr_ypresp_all_seq(XDR *xdrs, u_long *objp)
bcopy(out.ypresp_all_u.val.val.valdat_val, val,
out.ypresp_all_u.val.val.valdat_len);
val[out.ypresp_all_u.val.val.valdat_len] = '\0';
- xdr_free(xdr_ypresp_all, (char *)&out);
+ xdr_free((xdrproc_t)xdr_ypresp_all, &out);
r = (*ypresp_allfn)(status,
key, out.ypresp_all_u.val.key.keydat_len,
@@ -102,11 +102,11 @@ xdr_ypresp_all_seq(XDR *xdrs, u_long *objp)
return (TRUE);
break;
case YP_NOMORE:
- xdr_free(xdr_ypresp_all, (char *)&out);
+ xdr_free((xdrproc_t)xdr_ypresp_all, &out);
*objp = YP_NOMORE;
return (TRUE);
default:
- xdr_free(xdr_ypresp_all, (char *)&out);
+ xdr_free((xdrproc_t)xdr_ypresp_all, &out);
*objp = status;
return (TRUE);
}
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
index a9d2d13..6087f2b 100644
--- a/lib/libc/yp/yplib.c
+++ b/lib/libc/yp/yplib.c
@@ -260,7 +260,7 @@ ypmatch_cache_lookup(struct dom_binding *ypdb, char *map, keydat *key,
}
#endif
-char *
+const char *
ypbinderr_string(int incode)
{
static char err[80];
@@ -461,7 +461,8 @@ skipit:
tv.tv_sec = _yplib_timeout/2;
tv.tv_usec = 0;
r = clnt_call(client, YPBINDPROC_DOMAIN,
- xdr_domainname, (char *)&dom, xdr_ypbind_resp, &ypbr, tv);
+ (xdrproc_t)xdr_domainname, &dom,
+ (xdrproc_t)xdr_ypbind_resp, &ypbr, tv);
if (r != RPC_SUCCESS) {
clnt_destroy(client);
ysd->dom_vers = -1;
@@ -663,7 +664,8 @@ again:
bzero((char *)&yprv, sizeof yprv);
r = clnt_call(ysd->dom_client, YPPROC_MATCH,
- xdr_ypreq_key, &yprk, xdr_ypresp_val, &yprv, tv);
+ (xdrproc_t)xdr_ypreq_key, &yprk,
+ (xdrproc_t)xdr_ypresp_val, &yprv, tv);
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_match: clnt_call");
_yp_unbind(ysd);
@@ -680,7 +682,7 @@ again:
#endif
}
- xdr_free(xdr_ypresp_val, (char *)&yprv);
+ xdr_free((xdrproc_t)xdr_ypresp_val, &yprv);
return (r);
}
@@ -726,7 +728,8 @@ again:
bzero((char *)&yprkv, sizeof yprkv);
r = clnt_call(ysd->dom_client, YPPROC_FIRST,
- xdr_ypreq_nokey, &yprnk, xdr_ypresp_key_val, &yprkv, tv);
+ (xdrproc_t)xdr_ypreq_nokey, &yprnk,
+ (xdrproc_t)xdr_ypresp_key_val, &yprkv, tv);
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_first: clnt_call");
_yp_unbind(ysd);
@@ -743,7 +746,7 @@ again:
(*outval)[*outvallen] = '\0';
}
- xdr_free(xdr_ypresp_key_val, (char *)&yprkv);
+ xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv);
return (r);
}
@@ -781,7 +784,8 @@ again:
bzero((char *)&yprkv, sizeof yprkv);
r = clnt_call(ysd->dom_client, YPPROC_NEXT,
- xdr_ypreq_key, &yprk, xdr_ypresp_key_val, &yprkv, tv);
+ (xdrproc_t)xdr_ypreq_key, &yprk,
+ (xdrproc_t)xdr_ypresp_key_val, &yprkv, tv);
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_next: clnt_call");
_yp_unbind(ysd);
@@ -798,7 +802,7 @@ again:
(*outval)[*outvallen] = '\0';
}
- xdr_free(xdr_ypresp_key_val, (char *)&yprkv);
+ xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv);
return (r);
}
@@ -844,8 +848,8 @@ again:
ypresp_data = (void *)incallback->data;
if (clnt_call(clnt, YPPROC_ALL,
- xdr_ypreq_nokey, &yprnk,
- xdr_ypresp_all_seq, &status, tv) != RPC_SUCCESS) {
+ (xdrproc_t)xdr_ypreq_nokey, &yprnk,
+ (xdrproc_t)xdr_ypresp_all_seq, &status, tv) != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_all: clnt_call");
clnt_destroy(clnt);
_yp_unbind(ysd);
@@ -854,7 +858,7 @@ again:
clnt_destroy(clnt);
savstat = status;
- xdr_free(xdr_ypresp_all_seq, (char *)&status); /* not really needed... */
+ xdr_free((xdrproc_t)xdr_ypresp_all_seq, &status); /* not really needed... */
if (savstat != YP_NOMORE)
return (ypprot_err(savstat));
return (0);
@@ -888,7 +892,8 @@ again:
bzero((char *)(char *)&ypro, sizeof ypro);
r = clnt_call(ysd->dom_client, YPPROC_ORDER,
- xdr_ypreq_nokey, &yprnk, xdr_ypresp_order, &ypro, tv);
+ (xdrproc_t)xdr_ypreq_nokey, &yprnk,
+ (xdrproc_t)xdr_ypresp_order, &ypro, tv);
/*
* NIS+ in YP compat mode doesn't support the YPPROC_ORDER
@@ -908,7 +913,7 @@ again:
*outorder = ypro.ordernum;
}
- xdr_free(xdr_ypresp_order, (char *)&ypro);
+ xdr_free((xdrproc_t)xdr_ypresp_order, &ypro);
return (r);
}
@@ -939,7 +944,8 @@ again:
bzero((char *)&yprm, sizeof yprm);
r = clnt_call(ysd->dom_client, YPPROC_MASTER,
- xdr_ypreq_nokey, &yprnk, xdr_ypresp_master, &yprm, tv);
+ (xdrproc_t)xdr_ypreq_nokey, &yprnk,
+ (xdrproc_t)xdr_ypresp_master, &yprm, tv);
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_master: clnt_call");
_yp_unbind(ysd);
@@ -950,7 +956,7 @@ again:
*outname = (char *)strdup(yprm.peer);
}
- xdr_free(xdr_ypresp_master, (char *)&yprm);
+ xdr_free((xdrproc_t)xdr_ypresp_master, &yprm);
return (r);
}
@@ -977,7 +983,8 @@ again:
bzero((char *)&ypml, sizeof ypml);
r = clnt_call(ysd->dom_client, YPPROC_MAPLIST,
- xdr_domainname,(char *)&indomain,xdr_ypresp_maplist,&ypml,tv);
+ (xdrproc_t)xdr_domainname, &indomain,
+ (xdrproc_t)xdr_ypresp_maplist, &ypml,tv);
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_maplist: clnt_call");
_yp_unbind(ysd);
@@ -987,11 +994,11 @@ again:
*outmaplist = ypml.maps;
}
- /* NO: xdr_free(xdr_ypresp_maplist, &ypml);*/
+ /* NO: xdr_free((xdrproc_t)xdr_ypresp_maplist, &ypml);*/
return (r);
}
-char *
+const char *
yperr_string(int incode)
{
static char err[80];
OpenPOWER on IntegriCloud