From 71e2da8387bd902443192f5f93dff124550cd15b Mon Sep 17 00:00:00 2001 From: "Liam J. Foy" Date: Wed, 23 Feb 2005 17:44:18 +0000 Subject: [PATCH] - Fix some xdrproc_t warnings (FreeBSD) - Constify - While here, sort the headers --- usr.bin/rup/rup.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index 3879ee7732..292a33aa87 100644 --- a/usr.bin/rup/rup.c +++ b/usr.bin/rup/rup.c @@ -31,25 +31,26 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/rup/rup.c,v 1.11.2.2 2001/07/02 23:43:04 mikeh Exp $ - * $DragonFly: src/usr.bin/rup/rup.c,v 1.3 2004/09/14 18:36:40 joerg Exp $ + * $DragonFly: src/usr.bin/rup/rup.c,v 1.4 2005/02/23 17:44:18 liamfoy Exp $ */ - -#include -#include -#include -#include -#include -#include #include #include -#include + +#include #include #include -#include #undef FSHIFT /* Use protocol's shift and scale values */ #undef FSCALE #include +#include +#include +#include +#include +#include +#include +#include + #define HOST_WIDTH 15 struct host_list { @@ -154,7 +155,7 @@ rstat_reply(char *replyp, struct sockaddr_in *raddrp) } static int -onehost(char *host) +onehost(const char *host) { CLIENT *rstat_clnt; statstime host_stat; @@ -177,7 +178,7 @@ onehost(char *host) bzero(&host_stat, sizeof(host_stat)); tv.tv_sec = 15; /* XXX ??? */ tv.tv_usec = 0; - if (clnt_call(rstat_clnt, RSTATPROC_STATS, xdr_void, NULL, xdr_statstime, &host_stat, tv) != RPC_SUCCESS) { + if (clnt_call(rstat_clnt, RSTATPROC_STATS, xdr_void, NULL, (xdrproc_t)xdr_statstime, &host_stat, tv) != RPC_SUCCESS) { clnt_perror(rstat_clnt, host); clnt_destroy(rstat_clnt); return(-1); @@ -197,7 +198,7 @@ allhosts(void) clnt_stat = clnt_broadcast(RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS, xdr_void, NULL, - xdr_statstime, (char *)&host_stat, rstat_reply); + (xdrproc_t)xdr_statstime, (char *)&host_stat, rstat_reply); if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) errx(1, "%s", clnt_sperrno(clnt_stat)); } -- 2.41.0