summaryrefslogtreecommitdiffstats
path: root/usr.bin/rup
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-04-28 10:49:15 +0000
committermarkm <markm@FreeBSD.org>2002-04-28 10:49:15 +0000
commite93fa004d7133433f07d726dd1c93c2b6f91864f (patch)
tree719652a2f4132b375aaf68a6c1b40cebc24c3e73 /usr.bin/rup
parent3bdd57c6570b459888724fc1b0650fbcd0ee761d (diff)
downloadFreeBSD-src-e93fa004d7133433f07d726dd1c93c2b6f91864f.zip
FreeBSD-src-e93fa004d7133433f07d726dd1c93c2b6f91864f.tar.gz
Style only; format function declarations, sort header includes, and
use __FBSDID().
Diffstat (limited to 'usr.bin/rup')
-rw-r--r--usr.bin/rup/rup.c46
1 files changed, 26 insertions, 20 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c
index b660b81..c078a95 100644
--- a/usr.bin/rup/rup.c
+++ b/usr.bin/rup/rup.c
@@ -31,27 +31,31 @@
* SUCH DAMAGE.
*/
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
+#include <sys/cdefs.h>
+
+__FBSDID("$FreeBSD$");
-#include <err.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
#include <sys/param.h>
#include <sys/socket.h>
-#include <netdb.h>
+
#include <rpc/rpc.h>
#include <rpc/pmap_clnt.h>
-#include <arpa/inet.h>
+
#undef FSHIFT /* Use protocol's shift and scale values */
#undef FSCALE
+
#include <rpcsvc/rstat.h>
+#include <arpa/inet.h>
+
+#include <err.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+#include <unistd.h>
+
#define HOST_WIDTH 15
struct host_list {
@@ -59,7 +63,8 @@ struct host_list {
struct in_addr addr;
} *hosts;
-int search_host(struct in_addr addr)
+static int
+search_host(struct in_addr addr)
{
struct host_list *hp;
@@ -73,7 +78,8 @@ int search_host(struct in_addr addr)
return(0);
}
-void remember_host(struct in_addr addr)
+static void
+remember_host(struct in_addr addr)
{
struct host_list *hp;
@@ -84,7 +90,7 @@ void remember_host(struct in_addr addr)
hosts = hp;
}
-int
+static int
rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp)
{
struct tm *tmp_time;
@@ -152,7 +158,7 @@ rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp)
return(0);
}
-int
+static int
onehost(char *host)
{
CLIENT *rstat_clnt;
@@ -188,21 +194,21 @@ onehost(char *host)
return (0);
}
-void
-allhosts()
+static void
+allhosts(void)
{
statstime host_stat;
enum clnt_stat clnt_stat;
clnt_stat = clnt_broadcast(RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS,
xdr_void, NULL,
- xdr_statstime, (char *)&host_stat, rstat_reply);
+ xdr_statstime, &host_stat, rstat_reply);
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT)
errx(1, "%s", clnt_sperrno(clnt_stat));
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: rup [hosts ...]\n");
exit(1);
OpenPOWER on IntegriCloud