aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ypbind/ypbind.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-02-06 15:26:07 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-02-06 15:26:07 +0000
commitdc584ddbc5eb111cdb9863e2652621d7b5e9ba76 (patch)
tree9c2a46d61c0b1ec2538854e870b6861acfd2ee7a /usr.sbin/ypbind/ypbind.c
parented4d1c46a27632aa553e7c24c969262bfc2d5c97 (diff)
downloadsrc-dc584ddbc5eb111cdb9863e2652621d7b5e9ba76.tar.gz
src-dc584ddbc5eb111cdb9863e2652621d7b5e9ba76.zip
ANSIfy and remove some dead code.
Sponsored by: DARPA, NAI Labs
Notes
Notes: svn path=/head/; revision=90298
Diffstat (limited to 'usr.sbin/ypbind/ypbind.c')
-rw-r--r--usr.sbin/ypbind/ypbind.c59
1 files changed, 19 insertions, 40 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index 38924877f4e5..8b85e9532ab0 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;