Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2015 02:39:08 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287341 - head/lib/libc/rpc
Message-ID:  <201509010239.t812d8xc032753@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Tue Sep  1 02:39:07 2015
New Revision: 287341
URL: https://svnweb.freebsd.org/changeset/base/287341

Log:
  Use ANSI C prototypes.
  
  Eliminates gcc 4.9 warnings.

Modified:
  head/lib/libc/rpc/auth_time.c
  head/lib/libc/rpc/clnt_dg.c
  head/lib/libc/rpc/crypt_client.c
  head/lib/libc/rpc/des_crypt.c
  head/lib/libc/rpc/des_soft.c
  head/lib/libc/rpc/getpublickey.c
  head/lib/libc/rpc/key_call.c
  head/lib/libc/rpc/rpc_soc.c
  head/lib/libc/rpc/rpcb_clnt.c
  head/lib/libc/rpc/rpcdname.c
  head/lib/libc/rpc/rtime.c
  head/lib/libc/rpc/svc_auth.c
  head/lib/libc/rpc/svc_auth_des.c
  head/lib/libc/rpc/svc_dg.c
  head/lib/libc/rpc/svc_vc.c

Modified: head/lib/libc/rpc/auth_time.c
==============================================================================
--- head/lib/libc/rpc/auth_time.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/auth_time.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -61,8 +61,7 @@ extern int _rpc_dtablesize( void );
 static int saw_alarm = 0;
 
 static void
-alarm_hndler(s)
-	int	s;
+alarm_hndler(int s)
 {
 	saw_alarm = 1;
 	return;
@@ -83,12 +82,7 @@ alarm_hndler(s)
  * Turn a 'universal address' into a struct sockaddr_in.
  * Bletch.
  */
-static int uaddr_to_sockaddr(uaddr, sin)
-#ifdef foo
-	endpoint		*endpt;
-#endif
-	char			*uaddr;
-	struct sockaddr_in	*sin;
+static int uaddr_to_sockaddr(char *uaddr, struct sockaddr_in *sin)
 {
 	unsigned char		p_bytes[2];
 	int			i;
@@ -118,9 +112,7 @@ static int uaddr_to_sockaddr(uaddr, sin)
  * Free the strings that were strduped into the eps structure.
  */
 static void
-free_eps(eps, num)
-	endpoint	eps[];
-	int		num;
+free_eps(endpoint eps[], int num)
 {
 	int		i;
 
@@ -142,14 +134,15 @@ free_eps(eps, num)
  * fact that gethostbyname() could do an NIS search. Ideally, the
  * NIS+ server will call __rpc_get_time_offset() with the nis_server
  * structure already populated.
+ *
+ * host  - name of the time host
+ * srv   - nis_server struct to use.
+ * eps[] - array of endpoints
+ * maxep - max array size
  */
 static nis_server *
-get_server(sin, host, srv, eps, maxep)
-	struct sockaddr_in *sin;
-	char		*host;	/* name of the time host	*/
-	nis_server	*srv;	/* nis_server struct to use.	*/
-	endpoint	eps[];	/* array of endpoints		*/
-	int		maxep;	/* max array size		*/
+get_server(struct sockaddr_in *sin, char *host, nis_server *srv,
+    endpoint eps[], int maxep)
 {
 	char			hname[256];
 	int			num_ep = 0, i;
@@ -236,14 +229,16 @@ get_server(sin, host, srv, eps, maxep)
  * structure and to then contact the machine for the time.
  *
  * td = "server" - "client"
+ *
+ * td    - Time difference
+ * srv   - NIS Server description
+ * thost - if no server, this is the timehost
+ * uaddr - known universal address
+ * netid - known network identifier
  */
 int
-__rpc_get_time_offset(td, srv, thost, uaddr, netid)
-	struct timeval	*td;	 /* Time difference			*/
-	nis_server	*srv;	 /* NIS Server description 		*/
-	char		*thost;	 /* if no server, this is the timehost	*/
-	char		**uaddr; /* known universal address		*/
-	struct sockaddr_in *netid; /* known network identifier		*/
+__rpc_get_time_offset(struct timeval *td, nis_server *srv, char *thost,
+    char **uaddr, struct sockaddr_in *netid)
 {
 	CLIENT			*clnt; 		/* Client handle 	*/
 	endpoint		*ep,		/* useful endpoints	*/

Modified: head/lib/libc/rpc/clnt_dg.c
==============================================================================
--- head/lib/libc/rpc/clnt_dg.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/clnt_dg.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -153,15 +153,17 @@ struct cu_data {
  * If they are 0, use the transport default.
  *
  * If svcaddr is NULL, returns NULL.
+ *
+ * fd      - open file descriptor
+ * svcaddr - servers address
+ * program - program number
+ * version - version number
+ * sendsz  - buffer recv size
+ * recvsz  - buffer send size
  */
 CLIENT *
-clnt_dg_create(fd, svcaddr, program, version, sendsz, recvsz)
-	int fd;				/* open file descriptor */
-	const struct netbuf *svcaddr;	/* servers address */
-	rpcprog_t program;		/* program number */
-	rpcvers_t version;		/* version number */
-	u_int sendsz;			/* buffer recv size */
-	u_int recvsz;			/* buffer send size */
+clnt_dg_create(int fd, const struct netbuf *svcaddr, rpcprog_t program,
+    rpcvers_t version, u_int sendsz, u_int recvsz)
 {
 	CLIENT *cl = NULL;		/* client handle */
 	struct cu_data *cu = NULL;	/* private data */
@@ -301,15 +303,18 @@ err2:
 	return (NULL);
 }
 
+/*
+ * cl       - client handle
+ * proc     - procedure number
+ * xargs    - xdr routine for args
+ * argsp    - pointer to args
+ * xresults - xdr routine for results
+ * resultsp - pointer to results
+ * utimeout - seconds to wait before giving up
+ */
 static enum clnt_stat
-clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
-	CLIENT	*cl;			/* client handle */
-	rpcproc_t	proc;		/* procedure number */
-	xdrproc_t	xargs;		/* xdr routine for args */
-	void		*argsp;		/* pointer to args */
-	xdrproc_t	xresults;	/* xdr routine for results */
-	void		*resultsp;	/* pointer to results */
-	struct timeval	utimeout;	/* seconds to wait before giving up */
+clnt_dg_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs, void *argsp,
+    xdrproc_t xresults, void *resultsp, struct timeval utimeout)
 {
 	struct cu_data *cu = (struct cu_data *)cl->cl_private;
 	XDR *xdrs;
@@ -602,9 +607,7 @@ out:
 }
 
 static void
-clnt_dg_geterr(cl, errp)
-	CLIENT *cl;
-	struct rpc_err *errp;
+clnt_dg_geterr(CLIENT *cl, struct rpc_err *errp)
 {
 	struct cu_data *cu = (struct cu_data *)cl->cl_private;
 
@@ -612,10 +615,7 @@ clnt_dg_geterr(cl, errp)
 }
 
 static bool_t
-clnt_dg_freeres(cl, xdr_res, res_ptr)
-	CLIENT *cl;
-	xdrproc_t xdr_res;
-	void *res_ptr;
+clnt_dg_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr)
 {
 	struct cu_data *cu = (struct cu_data *)cl->cl_private;
 	XDR *xdrs = &(cu->cu_outxdrs);
@@ -638,16 +638,12 @@ clnt_dg_freeres(cl, xdr_res, res_ptr)
 
 /*ARGSUSED*/
 static void
-clnt_dg_abort(h)
-	CLIENT *h;
+clnt_dg_abort(CLIENT *h)
 {
 }
 
 static bool_t
-clnt_dg_control(cl, request, info)
-	CLIENT *cl;
-	u_int request;
-	void *info;
+clnt_dg_control(CLIENT *cl, u_int request, void *info)
 {
 	struct cu_data *cu = (struct cu_data *)cl->cl_private;
 	struct netbuf *addr;
@@ -790,8 +786,7 @@ clnt_dg_control(cl, request, info)
 }
 
 static void
-clnt_dg_destroy(cl)
-	CLIENT *cl;
+clnt_dg_destroy(CLIENT *cl)
 {
 	struct cu_data *cu = (struct cu_data *)cl->cl_private;
 	int cu_fd = cu->cu_fd;
@@ -820,7 +815,7 @@ clnt_dg_destroy(cl)
 }
 
 static struct clnt_ops *
-clnt_dg_ops()
+clnt_dg_ops(void)
 {
 	static struct clnt_ops ops;
 	sigset_t mask;
@@ -848,8 +843,7 @@ clnt_dg_ops()
  * Make sure that the time is not garbage.  -1 value is allowed.
  */
 static bool_t
-time_not_ok(t)
-	struct timeval *t;
+time_not_ok(struct timeval *t)
 {
 	return (t->tv_sec < -1 || t->tv_sec > 100000000 ||
 		t->tv_usec < -1 || t->tv_usec > 1000000);

Modified: head/lib/libc/rpc/crypt_client.c
==============================================================================
--- head/lib/libc/rpc/crypt_client.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/crypt_client.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -43,10 +43,7 @@ __FBSDID("$FreeBSD$");
 #include "un-namespace.h"
 
 int
-_des_crypt_call(buf, len, dparms)
-	char *buf;
-	int len;
-	struct desparams *dparms;
+_des_crypt_call(char *buf, int len, struct desparams *dparms)
 {
 	CLIENT *clnt;
 	desresp  *result_1;

Modified: head/lib/libc/rpc/des_crypt.c
==============================================================================
--- head/lib/libc/rpc/des_crypt.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/des_crypt.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -70,12 +70,7 @@ extern int _des_crypt_call(char *, int, 
  * CBC mode encryption
  */
 int
-cbc_crypt(key, buf, len, mode, ivec)
-	char *key;
-	char *buf;
-	unsigned len;
-	unsigned mode;
-	char *ivec;	
+cbc_crypt(char *key, char *buf, unsigned len, unsigned mode, char *ivec)
 {
 	int err;
 	struct desparams dp;
@@ -97,11 +92,7 @@ cbc_crypt(key, buf, len, mode, ivec)
  * ECB mode encryption
  */
 int
-ecb_crypt(key, buf, len, mode)
-	char *key;
-	char *buf;
-	unsigned len;
-	unsigned mode;
+ecb_crypt(char *key, char *buf, unsigned len, unsigned mode)
 {
 	struct desparams dp;
 
@@ -120,12 +111,8 @@ ecb_crypt(key, buf, len, mode)
  * Common code to cbc_crypt() & ecb_crypt()
  */
 static int
-common_crypt(key, buf, len, mode, desp)	
-	char *key;	
-	char *buf;
-	unsigned len;
-	unsigned mode;
-	struct desparams *desp;
+common_crypt(char *key, char *buf, unsigned len, unsigned mode,
+    struct desparams *desp)
 {
 	int desdev;
 

Modified: head/lib/libc/rpc/des_soft.c
==============================================================================
--- head/lib/libc/rpc/des_soft.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/des_soft.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -58,8 +58,7 @@ static char partab[128] = {
  * Add odd parity to low bit of 8 byte key
  */
 void
-des_setparity(p)
-	char *p;
+des_setparity(char *p)
 {
 	int i;
 

Modified: head/lib/libc/rpc/getpublickey.c
==============================================================================
--- head/lib/libc/rpc/getpublickey.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/getpublickey.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -62,9 +62,7 @@ int (*__getpublickey_LOCAL)() = 0;
  * Get somebody's public key
  */
 static int
-__getpublickey_real(netname, publickey)
-	const char *netname;
-	char *publickey;
+__getpublickey_real(const char *netname, char *publickey)
 {
 	char lookup[3 * HEXKEYBYTES];
 	char *p;
@@ -89,9 +87,7 @@ __getpublickey_real(netname, publickey)
  */
 
 int
-getpublicandprivatekey(key, ret)
-	const char *key;
-	char *ret;
+getpublicandprivatekey(const char *key, char *ret)
 {
 	char buf[1024];	/* big enough */
 	char *res;
@@ -166,9 +162,7 @@ getpublicandprivatekey(key, ret)
 	}
 }
 
-int getpublickey(netname, publickey)
-	const char *netname;
-	char *publickey;
+int getpublickey(const char *netname, char *publickey)
 {
 	if (__getpublickey_LOCAL != NULL)
 		return(__getpublickey_LOCAL(netname, publickey));

Modified: head/lib/libc/rpc/key_call.c
==============================================================================
--- head/lib/libc/rpc/key_call.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/key_call.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -88,8 +88,7 @@ des_block *(*__key_gendes_LOCAL)() = 0;
 static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *);
 
 int
-key_setsecret(secretkey)
-	const char *secretkey;
+key_setsecret(const char *secretkey)
 {
 	keystatus status;
 
@@ -131,10 +130,7 @@ key_secretkey_is_set(void)
 }
 
 int
-key_encryptsession_pk(remotename, remotekey, deskey)
-	char *remotename;
-	netobj *remotekey;
-	des_block *deskey;
+key_encryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey)
 {
 	cryptkeyarg2 arg;
 	cryptkeyres res;
@@ -155,10 +151,7 @@ key_encryptsession_pk(remotename, remote
 }
 
 int
-key_decryptsession_pk(remotename, remotekey, deskey)
-	char *remotename;
-	netobj *remotekey;
-	des_block *deskey;
+key_decryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey)
 {
 	cryptkeyarg2 arg;
 	cryptkeyres res;
@@ -179,9 +172,7 @@ key_decryptsession_pk(remotename, remote
 }
 
 int
-key_encryptsession(remotename, deskey)
-	const char *remotename;
-	des_block *deskey;
+key_encryptsession(const char *remotename, des_block *deskey)
 {
 	cryptkeyarg arg;
 	cryptkeyres res;
@@ -201,9 +192,7 @@ key_encryptsession(remotename, deskey)
 }
 
 int
-key_decryptsession(remotename, deskey)
-	const char *remotename;
-	des_block *deskey;
+key_decryptsession(const char *remotename, des_block *deskey)
 {
 	cryptkeyarg arg;
 	cryptkeyres res;
@@ -223,8 +212,7 @@ key_decryptsession(remotename, deskey)
 }
 
 int
-key_gendes(key)
-	des_block *key;
+key_gendes(des_block *key)
 {
 	if (!key_call((u_long)KEY_GEN, (xdrproc_t)xdr_void, NULL,
 			(xdrproc_t)xdr_des_block, key)) {
@@ -234,8 +222,7 @@ key_gendes(key)
 }
 
 int
-key_setnet(arg)
-struct key_netstarg *arg;
+key_setnet(struct key_netstarg *arg)
 {
 	keystatus status;
 
@@ -254,9 +241,7 @@ struct key_netstarg *arg;
 
 
 int
-key_get_conv(pkey, deskey)
-	char *pkey;
-	des_block *deskey;
+key_get_conv(char *pkey, des_block *deskey)
 {
 	cryptkeyres res;
 
@@ -305,8 +290,7 @@ key_call_init(void)
  * Keep the handle cached.  This call may be made quite often.
  */
 static CLIENT *
-getkeyserv_handle(vers)
-int	vers;
+getkeyserv_handle(int vers)
 {
 	void *localhandle;
 	struct netconfig *nconf;
@@ -429,12 +413,8 @@ int	vers;
 /* returns  0 on failure, 1 on success */
 
 static int
-key_call(proc, xdr_arg, arg, xdr_rslt, rslt)
-	u_long proc;
-	xdrproc_t xdr_arg;
-	void *arg;
-	xdrproc_t xdr_rslt;
-	void *rslt;
+key_call(u_long proc, xdrproc_t xdr_arg, void *arg, xdrproc_t xdr_rslt,
+    void *rslt)
 {
 	CLIENT *clnt;
 	struct timeval wait_time;

Modified: head/lib/libc/rpc/rpc_soc.c
==============================================================================
--- head/lib/libc/rpc/rpc_soc.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/rpc_soc.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -88,14 +88,8 @@ static bool_t rpc_wrap_bcast(char *, str
  * A common clnt create routine
  */
 static CLIENT *
-clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp)
-	struct sockaddr_in *raddr;
-	rpcprog_t prog;
-	rpcvers_t vers;
-	int *sockp;
-	u_int sendsz;
-	u_int recvsz;
-	char *tp;
+clnt_com_create(struct sockaddr_in *raddr, rpcprog_t prog, rpcvers_t vers, int *sockp,
+    u_int sendsz, u_int recvsz, char *tp)
 {
 	CLIENT *cl;
 	int madefd = FALSE;
@@ -164,14 +158,8 @@ err:	if (madefd == TRUE)
 }
 
 CLIENT *
-clntudp_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz)
-	struct sockaddr_in *raddr;
-	u_long prog;
-	u_long vers;
-	struct timeval wait;
-	int *sockp;
-	u_int sendsz;
-	u_int recvsz;
+clntudp_bufcreate(struct sockaddr_in *raddr, u_long prog, u_long vers,
+    struct timeval wait, int *sockp, u_int sendsz, u_int recvsz)
 {
 	CLIENT *cl;
 
@@ -185,12 +173,8 @@ clntudp_bufcreate(raddr, prog, vers, wai
 }
 
 CLIENT *
-clntudp_create(raddr, program, version, wait, sockp)
-	struct sockaddr_in *raddr;
-	u_long program;
-	u_long version;
-	struct timeval wait;
-	int *sockp;
+clntudp_create(struct sockaddr_in *raddr, u_long program, u_long version,
+    struct timeval wait, int *sockp)
 {
 
 	return clntudp_bufcreate(raddr, program, version, wait, sockp,
@@ -198,13 +182,8 @@ clntudp_create(raddr, program, version, 
 }
 
 CLIENT *
-clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
-	struct sockaddr_in *raddr;
-	u_long prog;
-	u_long vers;
-	int *sockp;
-	u_int sendsz;
-	u_int recvsz;
+clnttcp_create(struct sockaddr_in *raddr, u_long prog, u_long vers, int *sockp,
+    u_int sendsz, u_int recvsz)
 {
 
 	return clnt_com_create(raddr, (rpcprog_t)prog, (rpcvers_t)vers, sockp,
@@ -212,9 +191,7 @@ clnttcp_create(raddr, prog, vers, sockp,
 }
 
 CLIENT *
-clntraw_create(prog, vers)
-	u_long prog;
-	u_long vers;
+clntraw_create(u_long prog, u_long vers)
 {
 
 	return clnt_raw_create((rpcprog_t)prog, (rpcvers_t)vers);
@@ -224,11 +201,7 @@ clntraw_create(prog, vers)
  * A common server create routine
  */
 static SVCXPRT *
-svc_com_create(fd, sendsize, recvsize, netid)
-	int fd;
-	u_int sendsize;
-	u_int recvsize;
-	char *netid;
+svc_com_create(int fd, u_int sendsize, u_int recvsize, char *netid)
 {
 	struct netconfig *nconf;
 	SVCXPRT *svc;
@@ -268,29 +241,21 @@ svc_com_create(fd, sendsize, recvsize, n
 }
 
 SVCXPRT *
-svctcp_create(fd, sendsize, recvsize)
-	int fd;
-	u_int sendsize;
-	u_int recvsize;
+svctcp_create(int fd, u_int sendsize, u_int recvsize)
 {
 
 	return svc_com_create(fd, sendsize, recvsize, "tcp");
 }
 
 SVCXPRT *
-svcudp_bufcreate(fd, sendsz, recvsz)
-	int fd;
-	u_int sendsz, recvsz;
+svcudp_bufcreate(int fd, u_int sendsz, u_int recvsz)
 {
 
 	return svc_com_create(fd, sendsz, recvsz, "udp");
 }
 
 SVCXPRT *
-svcfd_create(fd, sendsize, recvsize)
-	int fd;
-	u_int sendsize;
-	u_int recvsize;
+svcfd_create(int fd, u_int sendsize, u_int recvsize)
 {
 
 	return svc_fd_create(fd, sendsize, recvsize);
@@ -298,8 +263,7 @@ svcfd_create(fd, sendsize, recvsize)
 
 
 SVCXPRT *
-svcudp_create(fd)
-	int fd;
+svcudp_create(int fd)
 {
 
 	return svc_com_create(fd, UDPMSGSIZE, UDPMSGSIZE, "udp");
@@ -313,8 +277,7 @@ svcraw_create()
 }
 
 int
-get_myaddress(addr)
-	struct sockaddr_in *addr;
+get_myaddress(struct sockaddr_in *addr)
 {
 
 	memset((void *) addr, 0, sizeof(*addr));
@@ -328,11 +291,8 @@ get_myaddress(addr)
  * For connectionless "udp" transport. Obsoleted by rpc_call().
  */
 int
-callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
-	const char *host;
-	int prognum, versnum, procnum;
-	xdrproc_t inproc, outproc;
-	void *in, *out;
+callrpc(const char *host, int prognum, int versnum, int procnum,
+    xdrproc_t inproc, void *in, xdrproc_t outproc, void *out)
 {
 
 	return (int)rpc_call(host, (rpcprog_t)prognum, (rpcvers_t)versnum,
@@ -343,10 +303,9 @@ callrpc(host, prognum, versnum, procnum,
  * For connectionless kind of transport. Obsoleted by rpc_reg()
  */
 int
-registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
-	int prognum, versnum, procnum;
-	char *(*progname)(char [UDPMSGSIZE]);
-	xdrproc_t inproc, outproc;
+registerrpc(int prognum, int versnum, int procnum,
+    char *(*progname)(char [UDPMSGSIZE]),
+    xdrproc_t inproc, xdrproc_t outproc)
 {
 
 	return rpc_reg((rpcprog_t)prognum, (rpcvers_t)versnum,
@@ -374,10 +333,12 @@ clnt_broadcast_key_init(void)
  */
 /* ARGSUSED */
 static bool_t
-rpc_wrap_bcast(resultp, addr, nconf)
-	char *resultp;		/* results of the call */
-	struct netbuf *addr;	/* address of the guy who responded */
-	struct netconfig *nconf; /* Netconf of the transport */
+rpc_wrap_bcast(char *resultp, struct netbuf *addr, struct netconfig *nconf)
+/*
+ *	char *resultp;		// results of the call
+ *	struct netbuf *addr;	// address of the guy who responded
+ *	struct netconfig *nconf; // Netconf of the transport
+ */
 {
 	resultproc_t clnt_broadcast_result;
 
@@ -395,15 +356,18 @@ rpc_wrap_bcast(resultp, addr, nconf)
  * Broadcasts on UDP transport. Obsoleted by rpc_broadcast().
  */
 enum clnt_stat
-clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
-	u_long		prog;		/* program number */
-	u_long		vers;		/* version number */
-	u_long		proc;		/* procedure number */
-	xdrproc_t	xargs;		/* xdr routine for args */
-	void	       *argsp;		/* pointer to args */
-	xdrproc_t	xresults;	/* xdr routine for results */
-	void	       *resultsp;	/* pointer to results */
-	resultproc_t	eachresult;	/* call with each result obtained */
+clnt_broadcast(u_long prog, u_long vers, u_long proc, xdrproc_t xargs,
+    void *argsp, xdrproc_t xresults, void *resultsp, resultproc_t eachresult)
+/*
+ *	u_long		prog;		// program number
+ *	u_long		vers;		// version number
+ *	u_long		proc;		// procedure number
+ *	xdrproc_t	xargs;		// xdr routine for args
+ *	void	       *argsp;		// pointer to args
+ *	xdrproc_t	xresults;	// xdr routine for results
+ *	void	       *resultsp;	// pointer to results
+ *	resultproc_t	eachresult;	// call with each result obtained
+ */
 {
 
 	if (thr_main())
@@ -422,11 +386,14 @@ clnt_broadcast(prog, vers, proc, xargs, 
  * authdes_seccreate().
  */
 AUTH *
-authdes_create(servername, window, syncaddr, ckey)
-	char *servername;		/* network name of server */
-	u_int window;			/* time to live */
-	struct sockaddr *syncaddr;	/* optional hostaddr to sync with */
-	des_block *ckey;		/* optional conversation key to use */
+authdes_create(char *servername, u_int window, struct sockaddr *syncaddr,
+    des_block *ckey)
+/*
+ *	char *servername;		// network name of server
+ *	u_int window;			// time to live
+ *	struct sockaddr *syncaddr;	// optional hostaddr to sync with
+ *	des_block *ckey;		// optional conversation key to use
+ */
 {
 	AUTH *dummy;
 	AUTH *nauth;
@@ -453,13 +420,8 @@ fallback:
  * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
  */
 CLIENT *
-clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
-	struct sockaddr_un *raddr;
-	u_long prog;
-	u_long vers;
-	int *sockp;
-	u_int sendsz;
-	u_int recvsz;
+clntunix_create(struct sockaddr_un *raddr, u_long prog, u_long vers, int *sockp,
+    u_int sendsz, u_int recvsz)
 {
 	struct netbuf *svcaddr;
 	CLIENT *cl;
@@ -504,11 +466,7 @@ done:
  * Obsoleted by svc_vc_create().
  */
 SVCXPRT *
-svcunix_create(sock, sendsize, recvsize, path)
-	int sock;
-	u_int sendsize;
-	u_int recvsize;
-	char *path;
+svcunix_create(int sock, u_int sendsize, u_int recvsize, char *path)
 {
 	struct netconfig *nconf;
 	void *localhandle;
@@ -568,10 +526,7 @@ done:
  * descriptor as its first input. Obsoleted by svc_fd_create();
  */
 SVCXPRT *
-svcunixfd_create(fd, sendsize, recvsize)
-	int fd;
-	u_int sendsize;
-	u_int recvsize;
+svcunixfd_create(int fd, u_int sendsize, u_int recvsize)
 {
  	return (svc_fd_create(fd, sendsize, recvsize));
 }

Modified: head/lib/libc/rpc/rpcb_clnt.c
==============================================================================
--- head/lib/libc/rpc/rpcb_clnt.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/rpcb_clnt.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -109,9 +109,7 @@ static struct netbuf *got_entry(rpcb_ent
  * These are private routines that may not be provided in future releases.
  */
 bool_t
-__rpc_control(request, info)
-	int	request;
-	void	*info;
+__rpc_control(int request, void *info)
 {
 	switch (request) {
 	case CLCR_GET_RPCB_TIMEOUT:
@@ -150,8 +148,7 @@ __rpc_control(request, info)
  */
 
 static struct address_cache *
-check_cache(host, netid)
-	const char *host, *netid;
+check_cache(const char *host, const char *netid)
 {
 	struct address_cache *cptr;
 
@@ -171,8 +168,7 @@ check_cache(host, netid)
 }
 
 static void
-delete_cache(addr)
-	struct netbuf *addr;
+delete_cache(struct netbuf *addr)
 {
 	struct address_cache *cptr, *prevptr = NULL;
 
@@ -286,10 +282,7 @@ out:
  * On error, returns NULL and free's everything.
  */
 static CLIENT *
-getclnthandle(host, nconf, targaddr)
-	const char *host;
-	const struct netconfig *nconf;
-	char **targaddr;
+getclnthandle(const char *host, const struct netconfig *nconf, char **targaddr)
 {
 	CLIENT *client;
 	struct netbuf *addr, taddr;
@@ -531,13 +524,13 @@ try_nconf:
 /*
  * Set a mapping between program, version and address.
  * Calls the rpcbind service to do the mapping.
+ *
+ * nconf   - Network structure of transport
+ * address - Services netconfig address
  */
 bool_t
-rpcb_set(program, version, nconf, address)
-	rpcprog_t program;
-	rpcvers_t version;
-	const struct netconfig *nconf;	/* Network structure of transport */
-	const struct netbuf *address;		/* Services netconfig address */
+rpcb_set(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf,
+    const struct netbuf *address)
 {
 	CLIENT *client;
 	bool_t rslt = FALSE;
@@ -594,10 +587,7 @@ rpcb_set(program, version, nconf, addres
  * only for the given transport.
  */
 bool_t
-rpcb_unset(program, version, nconf)
-	rpcprog_t program;
-	rpcvers_t version;
-	const struct netconfig *nconf;
+rpcb_unset(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf)
 {
 	CLIENT *client;
 	bool_t rslt = FALSE;
@@ -634,9 +624,7 @@ rpcb_unset(program, version, nconf)
  * From the merged list, find the appropriate entry
  */
 static struct netbuf *
-got_entry(relp, nconf)
-	rpcb_entry_list_ptr relp;
-	const struct netconfig *nconf;
+got_entry(rpcb_entry_list_ptr relp, const struct netconfig *nconf)
 {
 	struct netbuf *na = NULL;
 	rpcb_entry_list_ptr sp;
@@ -722,13 +710,9 @@ __rpcbind_is_up()
  * starts working properly.  Also look under clnt_vc.c.
  */
 struct netbuf *
-__rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
-	rpcprog_t program;
-	rpcvers_t version;
-	const struct netconfig *nconf;
-	const char *host;
-	CLIENT **clpp;
-	struct timeval *tp;
+__rpcb_findaddr_timed(rpcprog_t program, rpcvers_t version,
+    const struct netconfig *nconf, const char *host,
+    CLIENT **clpp, struct timeval *tp)
 {
 	static bool_t check_rpcbind = TRUE;
 	CLIENT *client = NULL;
@@ -1037,12 +1021,8 @@ done:
  * Assuming that the address is all properly allocated
  */
 int
-rpcb_getaddr(program, version, nconf, address, host)
-	rpcprog_t program;
-	rpcvers_t version;
-	const struct netconfig *nconf;
-	struct netbuf *address;
-	const char *host;
+rpcb_getaddr(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf,
+    struct netbuf *address, const char *host)
 {
 	struct netbuf *na;
 
@@ -1073,9 +1053,7 @@ rpcb_getaddr(program, version, nconf, ad
  * It returns NULL on failure.
  */
 rpcblist *
-rpcb_getmaps(nconf, host)
-	const struct netconfig *nconf;
-	const char *host;
+rpcb_getmaps(const struct netconfig *nconf, const char *host)
 {
 	rpcblist_ptr head = NULL;
 	CLIENT *client;
@@ -1206,9 +1184,7 @@ error:
  * Returns 1 if succeeds else 0.
  */
 bool_t
-rpcb_gettime(host, timep)
-	const char *host;
-	time_t *timep;
+rpcb_gettime(const char *host, time_t *timep)
 {
 	CLIENT *client = NULL;
 	void *handle;
@@ -1267,9 +1243,7 @@ rpcb_gettime(host, timep)
  * really be called because local n2a libraries are always provided.
  */
 char *
-rpcb_taddr2uaddr(nconf, taddr)
-	struct netconfig *nconf;
-	struct netbuf *taddr;
+rpcb_taddr2uaddr(struct netconfig *nconf, struct netbuf *taddr)
 {
 	CLIENT *client;
 	char *uaddr = NULL;
@@ -1301,9 +1275,7 @@ rpcb_taddr2uaddr(nconf, taddr)
  * really be called because local n2a libraries are always provided.
  */
 struct netbuf *
-rpcb_uaddr2taddr(nconf, uaddr)
-	struct netconfig *nconf;
-	char *uaddr;
+rpcb_uaddr2taddr(struct netconfig *nconf, char *uaddr)
 {
 	CLIENT *client;
 	struct netbuf *taddr;

Modified: head/lib/libc/rpc/rpcdname.c
==============================================================================
--- head/lib/libc/rpc/rpcdname.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/rpcdname.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -71,8 +71,7 @@ get_default_domain()
  * get rejected elsewhere in the NIS client package.
  */
 int
-__rpc_get_default_domain(domain)
-	char **domain;
+__rpc_get_default_domain(char **domain)
 {
 	if ((*domain = get_default_domain()) != 0)
 		return (0);

Modified: head/lib/libc/rpc/rtime.c
==============================================================================
--- head/lib/libc/rpc/rtime.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/rtime.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -67,10 +67,8 @@ extern int _rpc_dtablesize( void );
 static void do_close( int );
 
 int
-rtime(addrp, timep, timeout)
-	struct sockaddr_in *addrp;
-	struct timeval *timep;
-	struct timeval *timeout;
+rtime(struct sockaddr_in *addrp, struct timeval *timep,
+    struct timeval *timeout)
 {
 	int s;
 	fd_set readfds;
@@ -148,8 +146,7 @@ rtime(addrp, timep, timeout)
 }
 
 static void
-do_close(s)
-	int s;
+do_close(int s)
 {
 	int save;
 

Modified: head/lib/libc/rpc/svc_auth.c
==============================================================================
--- head/lib/libc/rpc/svc_auth.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/svc_auth.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -151,11 +151,7 @@ _authenticate(rqst, msg)
  * that don't need to inspect or modify the message body.
  */
 static bool_t
-svcauth_null_wrap(auth, xdrs, xdr_func, xdr_ptr)
-	SVCAUTH *auth;
-	XDR *xdrs;
-	xdrproc_t xdr_func;
-	caddr_t xdr_ptr;
+svcauth_null_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr)
 {
 
 	return (xdr_func(xdrs, xdr_ptr));
@@ -168,9 +164,7 @@ struct svc_auth_ops svc_auth_null_ops = 
 
 /*ARGSUSED*/
 enum auth_stat
-_svcauth_null(rqst, msg)
-	struct svc_req *rqst;
-	struct rpc_msg *msg;
+_svcauth_null(struct svc_req *rqst, struct rpc_msg *msg)
 {
 	return (AUTH_OK);
 }
@@ -190,9 +184,8 @@ _svcauth_null(rqst, msg)
  */
 
 int
-svc_auth_reg(cred_flavor, handler)
-	int cred_flavor;
-	enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *);
+svc_auth_reg(int cred_flavor,
+    enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *))
 {
 	struct authsvc *asp;
 

Modified: head/lib/libc/rpc/svc_auth_des.c
==============================================================================
--- head/lib/libc/rpc/svc_auth_des.c	Tue Sep  1 01:35:43 2015	(r287340)
+++ head/lib/libc/rpc/svc_auth_des.c	Tue Sep  1 02:39:07 2015	(r287341)
@@ -92,7 +92,7 @@ static short *authdes_lru/* [AUTHDES_CAC
 
 static void cache_init();	/* initialize the cache */
 static short cache_spot();	/* find an entry in the cache */
-static void cache_ref(/*short sid*/);	/* note that sid was ref'd */
+static void cache_ref(short sid);	/* note that sid was ref'd */
 
 static void invalidate();	/* invalidate entry in cache */
 
@@ -109,9 +109,7 @@ static struct {
  * Service side authenticator for AUTH_DES
  */
 enum auth_stat
-_svcauth_des(rqst, msg)
-	struct svc_req *rqst;
-	struct rpc_msg *msg;
+_svcauth_des(struct svc_req *rqst, struct rpc_msg *msg)
 {
 
 	long *ixdr;
@@ -387,8 +385,7 @@ cache_victim()
  * Note that sid was referenced
  */
 static void
-cache_ref(sid)
-	short sid;
+cache_ref(short sid)
 {
 	int i;
 	short curr;
@@ -410,10 +407,7 @@ cache_ref(sid)
  * return the spot in the cache.
  */
 static short
-cache_spot(key, name, timestamp)
-	des_block *key;
-	char *name;
-	struct timeval *timestamp;
+cache_spot(des_block *key, char *name, struct timeval *timestamp)
 {
 	struct cache_entry *cp;
 	int i;
@@ -461,12 +455,8 @@ struct bsdcred {
  * the credential.
  */
 int
-authdes_getucred(adc, uid, gid, grouplen, groups)
-	struct authdes_cred *adc;
-	uid_t *uid;
-	gid_t *gid;
-	int *grouplen;
-	gid_t *groups;
+authdes_getucred(struct authdes_cred *adc, uid_t *uid, gid_t *gid,
+    int *grouplen, gid_t *groups)
 {
 	unsigned sid;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509010239.t812d8xc032753>