diff options
author | des <des@FreeBSD.org> | 2002-04-28 15:18:50 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-04-28 15:18:50 +0000 |
commit | e48f76df853e520cafc8b0a6237838fa12f69ea3 (patch) | |
tree | d7c3c2d08e4ff1d59c15bcb1a7ee8e74f001cb1d /libexec | |
parent | 905d923df1beb294d386944f9fb3085807aefa0e (diff) | |
download | FreeBSD-src-e48f76df853e520cafc8b0a6237838fa12f69ea3.zip FreeBSD-src-e48f76df853e520cafc8b0a6237838fa12f69ea3.tar.gz |
Spell void * as void * rather than caddr_t. This is complicated by the
fact that caddr_t is often misspelled as char *.
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rpc.rquotad/rquotad.c | 10 | ||||
-rw-r--r-- | libexec/rpc.rstatd/rstat_proc.c | 9 | ||||
-rw-r--r-- | libexec/rpc.rusersd/rusers_proc.c | 11 | ||||
-rw-r--r-- | libexec/rpc.rwalld/rwalld.c | 13 | ||||
-rw-r--r-- | libexec/rpc.sprayd/sprayd.c | 4 | ||||
-rw-r--r-- | libexec/ypxfr/ypxfr_getmap.c | 4 | ||||
-rw-r--r-- | libexec/ypxfr/ypxfr_misc.c | 6 |
7 files changed, 30 insertions, 27 deletions
diff --git a/libexec/rpc.rquotad/rquotad.c b/libexec/rpc.rquotad/rquotad.c index ea3fb2a..ba9f42a 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 d1511a0..ac3289e 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 69380c9..71ccb9e 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 9fa71b3..c186a47 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 38d2135..fd45939 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 3c3d2e7..4ce5380 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 3c33286..f64f69d 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); } |