Module Name:    src
Committed By:   joerg
Date:           Tue Aug 30 20:29:41 UTC 2011

Modified Files:
        src/usr.sbin/rpc.bootparamd: bootparamd.c test.c

Log Message:
ANSIFy + static + __dead


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/rpc.bootparamd/bootparamd.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/rpc.bootparamd/test.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/rpc.bootparamd/bootparamd.c
diff -u src/usr.sbin/rpc.bootparamd/bootparamd.c:1.45 src/usr.sbin/rpc.bootparamd/bootparamd.c:1.46
--- src/usr.sbin/rpc.bootparamd/bootparamd.c:1.45	Sat Apr 18 12:57:10 2009
+++ src/usr.sbin/rpc.bootparamd/bootparamd.c	Tue Aug 30 20:29:41 2011
@@ -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;
 

Index: src/usr.sbin/rpc.bootparamd/test.c
diff -u src/usr.sbin/rpc.bootparamd/test.c:1.3 src/usr.sbin/rpc.bootparamd/test.c:1.4
--- src/usr.sbin/rpc.bootparamd/test.c:1.3	Mon Apr 28 20:24:17 2008
+++ src/usr.sbin/rpc.bootparamd/test.c	Tue Aug 30 20:29:41 2011
@@ -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;

Reply via email to