summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorplunky <plunky@NetBSD.org>2011-08-30 17:06:20 +0000
committerplunky <plunky@NetBSD.org>2011-08-30 17:06:20 +0000
commit3cd9f110a3b5d823dfa855b36c0a0b3ca97faa0b (patch)
tree36b768fff008b683b52a411eae1f23e5e8fbb47f /usr.bin
parentd978656c4d2c9d76d838899f16b846bdfce60bfb (diff)
Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is a different kind of pointer.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rup/rup.c6
-rw-r--r--usr.bin/rusers/rusers.c9
-rw-r--r--usr.bin/showmount/showmount.c12
-rw-r--r--usr.bin/ypwhich/ypwhich.c4
4 files changed, 16 insertions, 15 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c
index 7c0e5999acc..6ca79431f4f 100644
--- a/usr.bin/rup/rup.c
+++ b/usr.bin/rup/rup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rup.c,v 1.27 2007/12/15 19:44:53 perry Exp $ */
+/* $NetBSD: rup.c,v 1.28 2011/08/30 17:06:21 plunky Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rup.c,v 1.27 2007/12/15 19:44:53 perry Exp $");
+__RCSID("$NetBSD: rup.c,v 1.28 2011/08/30 17:06:21 plunky Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -323,7 +323,7 @@ allhosts(void)
}
clnt_stat = rpc_broadcast(RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS,
- xdr_void, NULL, xdr_statstime, (caddr_t)(void *)&host_stat,
+ (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_statstime, (caddr_t)(void *)&host_stat,
(resultproc_t)rstat_reply, "udp");
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT)
errx(1, "%s", clnt_sperrno(clnt_stat));
diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c
index 477b07a6dbc..a491c72ac18 100644
--- a/usr.bin/rusers/rusers.c
+++ b/usr.bin/rusers/rusers.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rusers.c,v 1.23 2006/05/11 01:25:23 mrg Exp $ */
+/* $NetBSD: rusers.c,v 1.24 2011/08/30 17:06:21 plunky Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rusers.c,v 1.23 2006/05/11 01:25:23 mrg Exp $");
+__RCSID("$NetBSD: rusers.c,v 1.24 2011/08/30 17:06:21 plunky Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -262,8 +262,9 @@ allhosts(void)
memset((char *)&up, 0, sizeof(up));
clnt_stat = rpc_broadcast(RUSERSPROG, RUSERSVERS_IDLE,
- RUSERSPROC_NAMES, xdr_void, NULL, xdr_utmpidlearr,
- (char *)&up, (resultproc_t)rusers_reply, "udp");
+ RUSERSPROC_NAMES, (xdrproc_t)xdr_void, NULL,
+ (xdrproc_t)xdr_utmpidlearr, (char *)&up,
+ (resultproc_t)rusers_reply, "udp");
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT)
errx(1, "%s", clnt_sperrno(clnt_stat));
}
diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c
index 012d1bc63ee..7ed01f9dbf6 100644
--- a/usr.bin/showmount/showmount.c
+++ b/usr.bin/showmount/showmount.c
@@ -1,4 +1,4 @@
-/* $NetBSD: showmount.c,v 1.18 2011/02/27 10:11:27 mbalmer Exp $ */
+/* $NetBSD: showmount.c,v 1.19 2011/08/30 17:06:21 plunky Exp $ */
/*
* Copyright (c) 1989, 1993, 1995
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1995\
#if 0
static char sccsid[] = "@(#)showmount.c 8.3 (Berkeley) 3/29/95";
#endif
-__RCSID("$NetBSD: showmount.c,v 1.18 2011/02/27 10:11:27 mbalmer Exp $");
+__RCSID("$NetBSD: showmount.c,v 1.19 2011/08/30 17:06:21 plunky Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -153,16 +153,16 @@ main(int argc, char **argv)
if (rpcs & DODUMP)
if ((estat = tcp_callrpc(host, RPCPROG_MNT, mntvers,
- RPCMNT_DUMP, xdr_void, (char *)0,
- xdr_mntdump, (char *)&mntdump)) != 0) {
+ RPCMNT_DUMP, (xdrproc_t)xdr_void, (char *)0,
+ (xdrproc_t)xdr_mntdump, (char *)&mntdump)) != 0) {
fprintf(stderr, "showmount: Can't do Mountdump rpc: ");
clnt_perrno(estat);
exit(1);
}
if (rpcs & DOEXPORTS)
if ((estat = tcp_callrpc(host, RPCPROG_MNT, mntvers,
- RPCMNT_EXPORT, xdr_void, (char *)0,
- xdr_exports, (char *)&exports)) != 0) {
+ RPCMNT_EXPORT, (xdrproc_t)xdr_void, (char *)0,
+ (xdrproc_t)xdr_exports, (char *)&exports)) != 0) {
fprintf(stderr, "showmount: Can't do Exports rpc: ");
clnt_perrno(estat);
exit(1);
diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c
index 004edc356c0..e5e8dd33335 100644
--- a/usr.bin/ypwhich/ypwhich.c
+++ b/usr.bin/ypwhich/ypwhich.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ypwhich.c,v 1.18 2011/02/01 20:58:15 chuck Exp $ */
+/* $NetBSD: ypwhich.c,v 1.19 2011/08/30 17:06:21 plunky Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor
@@ -394,7 +394,7 @@ find_mapmaster(const char *host, const char *domain, const char *map,
(void)printf("%s %s\n", ypml->ypml_name,
yprespmaster.master);
}
- xdr_free(xdr_ypresp_master, (void *)&yprespmaster);
+ xdr_free((xdrproc_t)xdr_ypresp_master, (void *)&yprespmaster);
}
clnt_destroy(ypserv);