Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2015 21:21:18 +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: r288046 - head/lib/libc/net
Message-ID:  <201509202121.t8KLLIEM011762@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Sun Sep 20 21:21:17 2015
New Revision: 288046
URL: https://svnweb.freebsd.org/changeset/base/288046

Log:
  Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

Modified:
  head/lib/libc/net/rcmd.c

Modified: head/lib/libc/net/rcmd.c
==============================================================================
--- head/lib/libc/net/rcmd.c	Sun Sep 20 21:21:01 2015	(r288045)
+++ head/lib/libc/net/rcmd.c	Sun Sep 20 21:21:17 2015	(r288046)
@@ -73,22 +73,15 @@ static int __icheckhost(const struct soc
 char paddr[NI_MAXHOST];
 
 int
-rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
-	char **ahost;
-	u_short rport;
-	const char *locuser, *remuser, *cmd;
-	int *fd2p;
+rcmd(char **ahost, int rport, const char *locuser, const char *remuser,
+    const char *cmd, int *fd2p)
 {
 	return rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, AF_INET);
 }
 
 int
-rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
-	char **ahost;
-	u_short rport;
-	const char *locuser, *remuser, *cmd;
-	int *fd2p;
-	int af;
+rcmd_af(char **ahost, int rport, const char *locuser, const char *remuser,
+    const char *cmd, int *fd2p, int af)
 {
 	struct addrinfo hints, *res, *ai;
 	struct sockaddr_storage from;
@@ -321,15 +314,13 @@ bad:
 }
 
 int
-rresvport(port)
-	int *port;
+rresvport(int *port)
 {
 	return rresvport_af(port, AF_INET);
 }
 
 int
-rresvport_af(alport, family)
-	int *alport, family;
+rresvport_af(int *alport, int family)
 {
 	int s;
 	struct sockaddr_storage ss;
@@ -380,9 +371,7 @@ int	__check_rhosts_file = 1;
 char	*__rcmd_errstr;
 
 int
-ruserok(rhost, superuser, ruser, luser)
-	const char *rhost, *ruser, *luser;
-	int superuser;
+ruserok(const char *rhost, int superuser, const char *ruser, const char *luser)
 {
 	struct addrinfo hints, *res, *r;
 	int error;
@@ -415,10 +404,7 @@ ruserok(rhost, superuser, ruser, luser)
  * Returns 0 if ok, -1 if not ok.
  */
 int
-iruserok(raddr, superuser, ruser, luser)
-	unsigned long raddr;
-	int superuser;
-	const char *ruser, *luser;
+iruserok(unsigned long raddr, int superuser, const char *ruser, const char *luser)
 {
 	struct sockaddr_in sin;
 
@@ -436,11 +422,8 @@ iruserok(raddr, superuser, ruser, luser)
  * Returns 0 if ok, -1 if not ok.
  */
 int
-iruserok_sa(ra, rlen, superuser, ruser, luser)
-	const void *ra;
-	int rlen;
-	int superuser;
-	const char *ruser, *luser;
+iruserok_sa(const void *ra, int rlen, int superuser, const char *ruser,
+    const char *luser)
 {
 	char *cp;
 	struct stat sbuf;
@@ -520,10 +503,7 @@ again:
  * Returns 0 if ok, -1 if not ok.
  */
 int
-__ivaliduser(hostf, raddr, luser, ruser)
-	FILE *hostf;
-	u_int32_t raddr;
-	const char *luser, *ruser;
+__ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser)
 {
 	struct sockaddr_in sin;
 
@@ -541,11 +521,8 @@ __ivaliduser(hostf, raddr, luser, ruser)
  * XXX obsolete API.
  */
 int
-__ivaliduser_af(hostf, raddr, luser, ruser, af, len)
-	FILE *hostf;
-	const void *raddr;
-	const char *luser, *ruser;
-	int af, len;
+__ivaliduser_af(FILE *hostf, const void *raddr, const char *luser,
+    const char *ruser, int af, int len)
 {
 	struct sockaddr *sa = NULL;
 	struct sockaddr_in *sin = NULL;
@@ -584,11 +561,8 @@ __ivaliduser_af(hostf, raddr, luser, rus
 }
 
 int
-__ivaliduser_sa(hostf, raddr, salen, luser, ruser)
-	FILE *hostf;
-	const struct sockaddr *raddr;
-	socklen_t salen;
-	const char *luser, *ruser;
+__ivaliduser_sa(FILE *hostf, const struct sockaddr *raddr, socklen_t salen,
+    const char *luser, const char *ruser)
 {
 	char *user, *p;
 	int ch;
@@ -707,10 +681,7 @@ __ivaliduser_sa(hostf, raddr, salen, lus
  * Returns "true" if match, 0 if no match.
  */
 static int
-__icheckhost(raddr, salen, lhost)
-	const struct sockaddr *raddr;
-	socklen_t salen;
-        const char *lhost;
+__icheckhost(const struct sockaddr *raddr, socklen_t salen, const char *lhost)
 {
 	struct sockaddr_in sin;
 	struct sockaddr_in6 *sin6;



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