1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

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

This commit is contained in:
Craig Rodrigues 2015-09-20 21:21:17 +00:00
parent 626c9d7433
commit 3ba5ea2408
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288046

View File

@ -73,22 +73,15 @@ static int __icheckhost(const struct sockaddr *, socklen_t, const char *);
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 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
}
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 @@ iruserok_sa(ra, rlen, superuser, ruser, luser)
* 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, ruser, af, len)
}
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, luser, ruser)
* 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;