summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypbind
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-02-06 15:26:07 +0000
committerdes <des@FreeBSD.org>2002-02-06 15:26:07 +0000
commitd7b064e238d98e1c9942cfb6e53c0767893310b1 (patch)
tree9c2a46d61c0b1ec2538854e870b6861acfd2ee7a /usr.sbin/ypbind
parent0f2cb9b020b907000a28323fc57a82fdb7d6626d (diff)
downloadFreeBSD-src-d7b064e238d98e1c9942cfb6e53c0767893310b1.zip
FreeBSD-src-d7b064e238d98e1c9942cfb6e53c0767893310b1.tar.gz
ANSIfy and remove some dead code.
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r--usr.sbin/ypbind/yp_ping.c14
-rw-r--r--usr.sbin/ypbind/ypbind.c59
2 files changed, 23 insertions, 50 deletions
diff --git a/usr.sbin/ypbind/yp_ping.c b/usr.sbin/ypbind/yp_ping.c
index d3ea4c9..3983ff3 100644
--- a/usr.sbin/ypbind/yp_ping.c
+++ b/usr.sbin/ypbind/yp_ping.c
@@ -129,11 +129,8 @@ static struct timeval tottimeout = { 1, 0 };
* Returns 0 if no map exists.
*/
static u_short
-__pmap_getport(address, program, version, protocol)
- struct sockaddr_in *address;
- u_long program;
- u_long version;
- u_int protocol;
+__pmap_getport(struct sockaddr_in *address, u_long program, u_long version,
+ u_int protocol)
{
u_short port = 0;
int sock = -1;
@@ -229,11 +226,8 @@ struct ping_req {
unsigned long xid;
};
-int __yp_ping(restricted_addrs, cnt, dom, port)
- struct in_addr *restricted_addrs;
- int cnt;
- char *dom;
- short *port;
+int
+__yp_ping(struct in_addr *restricted_addrs, int cnt, char *dom, short *port)
{
struct timeval tv = { 5, 0 };
struct ping_req **reqs;
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index 3892487..8b85e95 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -156,10 +156,7 @@ fd_set fdsr;
SVCXPRT *udptransp, *tcptransp;
void *
-ypbindproc_null_2_yp(transp, argp, clnt)
-SVCXPRT *transp;
-void *argp;
-CLIENT *clnt;
+ypbindproc_null_2_yp(SVCXPRT *transp, void *argp, CLIENT *clnt)
{
static char res;
@@ -168,10 +165,7 @@ CLIENT *clnt;
}
struct ypbind_resp *
-ypbindproc_domain_2_yp(transp, argp, clnt)
-SVCXPRT *transp;
-domainname *argp;
-CLIENT *clnt;
+ypbindproc_domain_2_yp(SVCXPRT *transp, domainname *argp, CLIENT *clnt)
{
static struct ypbind_resp res;
struct _dom_binding *ypdb;
@@ -241,10 +235,7 @@ rejecting.", *argp);
}
void *
-ypbindproc_setdom_2_yp(transp, argp, clnt)
-SVCXPRT *transp;
-ypbind_setdom *argp;
-CLIENT *clnt;
+ypbindproc_setdom_2_yp(SVCXPRT *transp, ypbind_setdom *argp, CLIENT *clnt)
{
struct sockaddr_in *fromsin, bindsin;
static char *result = NULL;
@@ -291,9 +282,7 @@ rejecting.", argp->ypsetdom_domain);
}
static void
-ypbindprog_2(rqstp, transp)
-struct svc_req *rqstp;
-register SVCXPRT *transp;
+ypbindprog_2(struct svc_req *rqstp, register SVCXPRT *transp)
{
union {
domainname ypbindproc_domain_2_arg;
@@ -353,8 +342,8 @@ register SVCXPRT *transp;
}
/* Jack the reaper */
-void reaper(sig)
-int sig;
+void
+reaper(int sig)
{
int st;
@@ -362,8 +351,8 @@ int sig;
children--;
}
-void terminate(sig)
-int sig;
+void
+terminate(int sig)
{
struct _dom_binding *ypdb;
char path[MAXPATHLEN];
@@ -386,9 +375,7 @@ int sig;
}
int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char *argv[])
{
struct timeval tv;
int i;
@@ -513,7 +500,7 @@ char **argv;
}
void
-checkwork()
+checkwork(void)
{
struct _dom_binding *ypdb;
@@ -533,8 +520,8 @@ checkwork()
* doesn't always result in an error (otherwise I would have caught
* the mistake much sooner), even though logically it should.
*/
-void handle_children(ypdb)
-struct _dom_binding *ypdb;
+void
+handle_children(struct _dom_binding *ypdb)
{
char buf[YPMAXDOMAIN + 1];
struct sockaddr_in addr;
@@ -590,9 +577,7 @@ struct _dom_binding *ypdb;
* Send our dying words back to our parent before we perish.
*/
int
-tell_parent(dom, addr)
-char *dom;
-struct sockaddr_in *addr;
+tell_parent(char *dom, struct sockaddr_in *addr)
{
char buf[YPMAXDOMAIN + 1];
struct timeval timeout;
@@ -658,8 +643,7 @@ struct sockaddr_in *addr;
* the 'eachresult' callback function.
*/
void
-broadcast(ypdb)
-struct _dom_binding *ypdb;
+broadcast(struct _dom_binding *ypdb)
{
bool_t out = FALSE;
enum clnt_stat stat;
@@ -772,8 +756,7 @@ struct _dom_binding *ypdb;
* need it to keep the system on its feet.
*/
int
-ping(ypdb)
-struct _dom_binding *ypdb;
+ping(struct _dom_binding *ypdb)
{
bool_t out;
struct timeval interval, timeout;
@@ -819,10 +802,8 @@ struct _dom_binding *ypdb;
return(0);
}
-void rpc_received(dom, raddrp, force)
-char *dom;
-struct sockaddr_in *raddrp;
-int force;
+void
+rpc_received(char *dom, struct sockaddr_in *raddrp, int force)
{
struct _dom_binding *ypdb, *prev = NULL;
struct iovec iov[2];
@@ -965,8 +946,7 @@ int force;
* 1 if not matched.
*/
int
-verify(addr)
-struct in_addr addr;
+verify(struct in_addr addr)
{
int i;
@@ -983,8 +963,7 @@ struct in_addr addr;
* resolve the specified hostnames.
*/
void
-yp_restricted_mode(args)
-char *args;
+yp_restricted_mode(char *args)
{
struct hostent *h;
int i = 0;
OpenPOWER on IntegriCloud