aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-04-28 15:18:50 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-04-28 15:18:50 +0000
commitf249dbcc7149848de00cd8f4e93fe140dfa3f219 (patch)
treed7c3c2d08e4ff1d59c15bcb1a7ee8e74f001cb1d /libexec
parent6c28b67b1e004e45f13067a61ca68a011848b065 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rpc.rquotad/rquotad.c10
-rw-r--r--libexec/rpc.rstatd/rstat_proc.c9
-rw-r--r--libexec/rpc.rusersd/rusers_proc.c11
-rw-r--r--libexec/rpc.rwalld/rwalld.c13
-rw-r--r--libexec/rpc.sprayd/sprayd.c4
-rw-r--r--libexec/ypxfr/ypxfr_getmap.c4
-rw-r--r--libexec/ypxfr/ypxfr_misc.c6
7 files changed, 30 insertions, 27 deletions
diff --git a/libexec/rpc.rquotad/rquotad.c b/libexec/rpc.rquotad/rquotad.c
index ea3fb2a42dc6..ba9f42ac42e7 100644
--- a/libexec/rpc.rquotad/rquotad.c
+++ b/libexec/rpc.rquotad/rquotad.c
@@ -114,7 +114,7 @@ rquota_service(struct svc_req *request, SVCXPRT *transp)
{
switch (request->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
break;
case RQUOTAPROC_GETQUOTA:
@@ -140,7 +140,7 @@ sendquota(struct svc_req *request, SVCXPRT *transp)
struct timeval timev;
bzero((char *)&getq_args, sizeof(getq_args));
- if (!svc_getargs(transp, xdr_getquota_args, (caddr_t)&getq_args)) {
+ if (!svc_getargs(transp, (xdrproc_t)xdr_getquota_args, &getq_args)) {
svcerr_decode(transp);
return;
}
@@ -172,10 +172,10 @@ sendquota(struct svc_req *request, SVCXPRT *transp)
getq_rslt.getquota_rslt_u.gqr_rquota.rq_ftimeleft =
dqblk.dqb_itime - timev.tv_sec;
}
- if (!svc_sendreply(transp, xdr_getquota_rslt, (char *)&getq_rslt)) {
+ if (!svc_sendreply(transp, (xdrproc_t)xdr_getquota_rslt, &getq_rslt)) {
svcerr_systemerr(transp);
}
- if (!svc_freeargs(transp, xdr_getquota_args, (caddr_t)&getq_args)) {
+ if (!svc_freeargs(transp, (xdrproc_t)xdr_getquota_args, &getq_args)) {
syslog(LOG_ERR, "unable to free arguments");
exit(1);
}
@@ -273,7 +273,7 @@ getfsquota(long id, char *path, struct dqblk *dqblk)
* Convert implicit 0 quota (EOF)
* into an explicit one (zero'ed dqblk)
*/
- bzero((caddr_t) dqblk, sizeof(struct dqblk));
+ bzero(dqblk, sizeof(struct dqblk));
ret = 1;
break;
case sizeof(struct dqblk): /* OK */
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index d1511a065283..ac3289e38777 100644
--- a/libexec/rpc.rstatd/rstat_proc.c
+++ b/libexec/rpc.rstatd/rstat_proc.c
@@ -438,7 +438,7 @@ rstat_service(struct svc_req *rqstp, SVCXPRT *transp)
switch (rqstp->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
goto leave;
case RSTATPROC_STATS:
@@ -486,15 +486,16 @@ rstat_service(struct svc_req *rqstp, SVCXPRT *transp)
goto leave;
}
bzero((char *)&argument, sizeof(argument));
- if (!svc_getargs(transp, xdr_argument, (caddr_t)&argument)) {
+ if (!svc_getargs(transp, (xdrproc_t)xdr_argument, &argument)) {
svcerr_decode(transp);
goto leave;
}
result = (*local)(&argument, rqstp);
- if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
+ if (result != NULL &&
+ !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) {
svcerr_systemerr(transp);
}
- if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument))
+ if (!svc_freeargs(transp, (xdrproc_t)xdr_argument, &argument))
errx(1, "unable to free arguments");
leave:
if (from_inetd)
diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c
index 69380c9115df..71ccb9ebc793 100644
--- a/libexec/rpc.rusersd/rusers_proc.c
+++ b/libexec/rpc.rusersd/rusers_proc.c
@@ -322,7 +322,7 @@ rusers_service(struct svc_req *rqstp, SVCXPRT *transp)
switch (rqstp->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
goto leave;
case RUSERSPROC_NUM:
@@ -369,16 +369,17 @@ rusers_service(struct svc_req *rqstp, SVCXPRT *transp)
svcerr_noproc(transp);
goto leave;
}
- bzero((char *)&argument, sizeof(argument));
- if (!svc_getargs(transp, xdr_argument, (caddr_t)&argument)) {
+ bzero(&argument, sizeof(argument));
+ if (!svc_getargs(transp, (xdrproc_t)xdr_argument, &argument)) {
svcerr_decode(transp);
goto leave;
}
result = (*local)(&argument, rqstp);
- if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
+ if (result != NULL &&
+ !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) {
svcerr_systemerr(transp);
}
- if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument)) {
+ if (!svc_freeargs(transp, (xdrproc_t)xdr_argument, &argument)) {
syslog(LOG_ERR, "unable to free arguments");
exit(1);
}
diff --git a/libexec/rpc.rwalld/rwalld.c b/libexec/rpc.rwalld/rwalld.c
index 9fa71b376452..c186a4748b2b 100644
--- a/libexec/rpc.rwalld/rwalld.c
+++ b/libexec/rpc.rwalld/rwalld.c
@@ -101,7 +101,7 @@ main(int argc, char *argv[])
(void)pmap_unset(WALLPROG, WALLVERS);
if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
err(1, "socket");
- bzero((char *)&sa, sizeof sa);
+ bzero(&sa, sizeof sa);
if (bind(s, (struct sockaddr *)&sa, sizeof sa) < 0)
err(1, "bind");
@@ -184,7 +184,7 @@ wallprog_1(struct svc_req *rqstp, SVCXPRT *transp)
switch (rqstp->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
goto leave;
case WALLPROC_WALL:
@@ -197,16 +197,17 @@ wallprog_1(struct svc_req *rqstp, SVCXPRT *transp)
svcerr_noproc(transp);
goto leave;
}
- bzero((char *)&argument, sizeof(argument));
- if (!svc_getargs(transp, xdr_argument, (caddr_t)&argument)) {
+ bzero(&argument, sizeof(argument));
+ if (!svc_getargs(transp, (xdrproc_t)xdr_argument, &argument)) {
svcerr_decode(transp);
goto leave;
}
result = (*local)(&argument, rqstp);
- if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
+ if (result != NULL &&
+ !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) {
svcerr_systemerr(transp);
}
- if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument)) {
+ if (!svc_freeargs(transp, (xdrproc_t)xdr_argument, &argument)) {
syslog(LOG_ERR, "unable to free arguments");
exit(1);
}
diff --git a/libexec/rpc.sprayd/sprayd.c b/libexec/rpc.sprayd/sprayd.c
index 38d2135753ad..fd45939785e5 100644
--- a/libexec/rpc.sprayd/sprayd.c
+++ b/libexec/rpc.sprayd/sprayd.c
@@ -138,7 +138,7 @@ spray_service(struct svc_req *rqstp, SVCXPRT *transp)
/*FALLTHROUGH*/
case NULLPROC:
- (void)svc_sendreply(transp, xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
return;
case SPRAYPROC_SPRAY:
@@ -157,7 +157,7 @@ spray_service(struct svc_req *rqstp, SVCXPRT *transp)
return;
}
- if (!svc_sendreply(transp, xdr_spraycumul, (caddr_t)&scum)) {
+ if (!svc_sendreply(transp, (xdrproc_t)xdr_spraycumul, &scum)) {
svcerr_systemerr(transp);
syslog(LOG_ERR, "bad svc_sendreply");
}
diff --git a/libexec/ypxfr/ypxfr_getmap.c b/libexec/ypxfr/ypxfr_getmap.c
index 3c3d2e7bc771..4ce5380e9145 100644
--- a/libexec/ypxfr/ypxfr_getmap.c
+++ b/libexec/ypxfr/ypxfr_getmap.c
@@ -84,8 +84,8 @@ create tcp handle"));
ypresp_allfn = callback;
ypresp_data = NULL;
- (void)clnt_call(clnt, YPPROC_ALL, xdr_ypreq_nokey, &req,
- xdr_ypresp_all_seq, &status, timeout);
+ (void)clnt_call(clnt, YPPROC_ALL, (xdrproc_t)xdr_ypreq_nokey, &req,
+ (xdrproc_t)xdr_ypresp_all_seq, &status, timeout);
clnt_destroy(clnt);
diff --git a/libexec/ypxfr/ypxfr_misc.c b/libexec/ypxfr/ypxfr_misc.c
index 3c3328650afb..f64f69dc8fa7 100644
--- a/libexec/ypxfr/ypxfr_misc.c
+++ b/libexec/ypxfr/ypxfr_misc.c
@@ -263,7 +263,7 @@ ypxfr_match(char *server, char *domain, char *map, char *key,
CLIENT *clnt;
static char buf[YPMAXRECORD + 2];
- bzero((char *)buf, sizeof(buf));
+ bzero(buf, sizeof(buf));
if ((clnt = clnt_create(server, YPPROG,YPVERS,"udp")) == NULL) {
yp_error("failed to create UDP handle: %s",
@@ -286,11 +286,11 @@ ypxfr_match(char *server, char *domain, char *map, char *key,
clnt_destroy(clnt);
if (ypval->stat != YP_TRUE) {
- xdr_free(xdr_ypresp_val, (char *)ypval);
+ xdr_free((xdrproc_t)xdr_ypresp_val, ypval);
return(0);
}
- xdr_free(xdr_ypresp_val, (char *)ypval);
+ xdr_free((xdrproc_t)xdr_ypresp_val, ypval);
return(1);
}