Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rpc.bootparamd ANSIFy + static + __dead
details: https://anonhg.NetBSD.org/src/rev/b6c27b1535e5
branches: trunk
changeset: 769058:b6c27b1535e5
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Aug 30 20:29:41 2011 +0000
description:
ANSIFy + static + __dead
diffstat:
usr.sbin/rpc.bootparamd/bootparamd.c | 43 ++++++++++++-----------------------
usr.sbin/rpc.bootparamd/test.c | 16 ++++---------
2 files changed, 20 insertions(+), 39 deletions(-)
diffs (157 lines):
diff -r 2a300039aa6c -r b6c27b1535e5 usr.sbin/rpc.bootparamd/bootparamd.c
--- a/usr.sbin/rpc.bootparamd/bootparamd.c Tue Aug 30 20:25:18 2011 +0000
+++ b/usr.sbin/rpc.bootparamd/bootparamd.c Tue Aug 30 20:29:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootparamd.c,v 1.45 2009/04/18 12:57:10 lukem Exp $ */
+/* $NetBSD: bootparamd.c,v 1.46 2011/08/30 20:29:41 joerg Exp $ */
/*
* This code is not copyright, and is placed in the public domain.
@@ -11,7 +11,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bootparamd.c,v 1.45 2009/04/18 12:57:10 lukem Exp $");
+__RCSID("$NetBSD: bootparamd.c,v 1.46 2011/08/30 20:29:41 joerg Exp $");
#endif
#include <sys/types.h>
@@ -53,7 +53,7 @@
static char askname[MAX_MACHINE_NAME];
static char domain_name[MAX_MACHINE_NAME];
-extern void bootparamprog_1 __P((struct svc_req *, SVCXPRT *));
+extern void bootparamprog_1(struct svc_req *, SVCXPRT *);
int _rpcsvcdirty = 0;
int _rpcpmstart = 0;
@@ -64,19 +64,16 @@
const char *bootpfile = _PATH_BOOTPARAMS;
char *iface = NULL;
-int main __P((int, char *[]));
-int lookup_bootparam __P((char *, char *, char *, char **, char **));
-void usage __P((void));
-static int get_localaddr __P((const char *, struct sockaddr_in *));
+static int lookup_bootparam(char *, char *, char *, char **, char **);
+__dead static void usage(void);
+static int get_localaddr(const char *, struct sockaddr_in *);
/*
* ever familiar
*/
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
SVCXPRT *transp;
struct hostent *he;
@@ -154,9 +151,7 @@
}
bp_whoami_res *
-bootparamproc_whoami_1_svc(whoami, rqstp)
- bp_whoami_arg *whoami;
- struct svc_req *rqstp;
+bootparamproc_whoami_1_svc(bp_whoami_arg *whoami, struct svc_req *rqstp)
{
static bp_whoami_res res;
struct hostent *he;
@@ -228,9 +223,7 @@
bp_getfile_res *
-bootparamproc_getfile_1_svc(getfile, rqstp)
- bp_getfile_arg *getfile;
- struct svc_req *rqstp;
+bootparamproc_getfile_1_svc(bp_getfile_arg *getfile, struct svc_req *rqstp)
{
static bp_getfile_res res;
struct hostent *he;
@@ -312,13 +305,9 @@
}
-int
-lookup_bootparam(client, client_canonical, id, server, path)
- char *client;
- char *client_canonical;
- char *id;
- char **server;
- char **path;
+static int
+lookup_bootparam(char *client, char *client_canonical, char *id,
+ char **server, char **path)
{
FILE *f = fopen(bootpfile, "r");
#ifdef YP
@@ -462,8 +451,8 @@
return found ? ENOENT : EPERM;
}
-void
-usage()
+static void
+usage(void)
{
fprintf(stderr,
"usage: %s [-ds] [-i interface] [-r router] [-f bootparamsfile]\n",
@@ -472,9 +461,7 @@
}
static int
-get_localaddr(ifname, sin)
- const char *ifname;
- struct sockaddr_in *sin;
+get_localaddr(const char *ifname, struct sockaddr_in *sin)
{
struct ifaddrs *ifap, *ifa;
diff -r 2a300039aa6c -r b6c27b1535e5 usr.sbin/rpc.bootparamd/test.c
--- a/usr.sbin/rpc.bootparamd/test.c Tue Aug 30 20:25:18 2011 +0000
+++ b/usr.sbin/rpc.bootparamd/test.c Tue Aug 30 20:29:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: test.c,v 1.3 2008/04/28 20:24:17 martin Exp $ */
+/* $NetBSD: test.c,v 1.4 2011/08/30 20:29:41 joerg Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: test.c,v 1.3 2008/04/28 20:24:17 martin Exp $");
+__RCSID("$NetBSD: test.c,v 1.4 2011/08/30 20:29:41 joerg Exp $");
#endif
#include <stdio.h>
@@ -45,12 +45,8 @@
/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = {25, 0};
-int main(int, char *[]);
-
bp_whoami_res *
-bootparamproc_whoami_1(argp, clnt)
- bp_whoami_arg *argp;
- CLIENT *clnt;
+bootparamproc_whoami_1(bp_whoami_arg *argp, CLIENT *clnt)
{
static bp_whoami_res res;
enum clnt_stat st;
@@ -66,10 +62,8 @@
}
-int
-main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
CLIENT *cli;
bp_whoami_res *out;
Home |
Main Index |
Thread Index |
Old Index