summaryrefslogtreecommitdiffstats
path: root/usr.sbin
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
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')
-rw-r--r--usr.sbin/rpc.yppasswdd/pw_copy.c4
-rw-r--r--usr.sbin/rpc.yppasswdd/pw_util.c13
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_main.c15
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_server.c44
-rw-r--r--usr.sbin/rpc.ypupdated/update.c54
-rw-r--r--usr.sbin/rpc.ypupdated/yp_dbdelete.c5
-rw-r--r--usr.sbin/rpc.ypupdated/yp_dbupdate.c16
-rw-r--r--usr.sbin/rpc.ypupdated/ypupdated_main.c17
-rw-r--r--usr.sbin/rpc.ypupdated/ypupdated_server.c24
-rw-r--r--usr.sbin/rpc.ypxfrd/ypxfrd_main.c16
-rw-r--r--usr.sbin/yp_mkdb/yp_mkdb.c17
-rw-r--r--usr.sbin/ypbind/yp_ping.c14
-rw-r--r--usr.sbin/ypbind/ypbind.c59
-rw-r--r--usr.sbin/yppoll/yppoll.c5
-rw-r--r--usr.sbin/yppush/yppush_main.c50
-rw-r--r--usr.sbin/ypserv/yp_access.c21
-rw-r--r--usr.sbin/ypserv/yp_dblookup.c101
-rw-r--r--usr.sbin/ypserv/yp_dnslookup.c43
-rw-r--r--usr.sbin/ypserv/yp_error.c26
-rw-r--r--usr.sbin/ypserv/yp_main.c16
-rw-r--r--usr.sbin/ypserv/yp_server.c19
-rw-r--r--usr.sbin/ypserv/yp_svc_udp.c7
-rw-r--r--usr.sbin/ypset/ypset.c9
23 files changed, 227 insertions, 368 deletions
diff --git a/usr.sbin/rpc.yppasswdd/pw_copy.c b/usr.sbin/rpc.yppasswdd/pw_copy.c
index 99a79ca..24caf4d 100644
--- a/usr.sbin/rpc.yppasswdd/pw_copy.c
+++ b/usr.sbin/rpc.yppasswdd/pw_copy.c
@@ -52,9 +52,7 @@ static const char rcsid[] =
#include "yppasswdd_extern.h"
int
-pw_copy(ffd, tfd, pw)
- int ffd, tfd;
- struct passwd *pw;
+pw_copy(int ffd, int tfd, struct passwd *pw)
{
FILE *from, *to;
int done;
diff --git a/usr.sbin/rpc.yppasswdd/pw_util.c b/usr.sbin/rpc.yppasswdd/pw_util.c
index 86535b8..bd85b15 100644
--- a/usr.sbin/rpc.yppasswdd/pw_util.c
+++ b/usr.sbin/rpc.yppasswdd/pw_util.c
@@ -67,7 +67,7 @@ int pstat;
pid_t pid;
void
-pw_init()
+pw_init(void)
{
struct rlimit rlim;
@@ -99,7 +99,7 @@ pw_init()
static int lockfd;
int
-pw_lock()
+pw_lock(void)
{
/*
* If the master password file doesn't exist, the system is hosed.
@@ -120,7 +120,7 @@ pw_lock()
}
int
-pw_tmp()
+pw_tmp(void)
{
static char path[MAXPATHLEN];
int fd;
@@ -141,8 +141,7 @@ pw_tmp()
}
int
-pw_mkdb(username)
- const char *username;
+pw_mkdb(const char *username)
{
yp_error("rebuilding the database...");
@@ -172,9 +171,7 @@ pw_mkdb(username)
}
void
-pw_error(name, err, eval)
- const char *name;
- int err, eval;
+pw_error(const char *name, int err, int eval)
{
if (err && name != NULL)
yp_error("%s", name);
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
index be42263..b261feb 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
@@ -97,8 +97,8 @@ int resvport = 1;
int inplace = 0;
char *sockname = YP_SOCKNAME;
-static void terminate(sig)
- int sig;
+static void
+terminate(int sig)
{
rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL);
rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL);
@@ -106,8 +106,8 @@ static void terminate(sig)
exit(0);
}
-static void reload(sig)
- int sig;
+static void
+reload(int sig)
{
load_securenets();
}
@@ -142,7 +142,8 @@ closedown(int sig)
(void) alarm(_RPCSVC_CLOSEDOWN/2);
}
-static void usage()
+static void
+usage(void)
{
fprintf(stderr, "%s\n%s\n",
"usage: rpc.yppasswdd [-t master.passwd file] [-d domain] [-p path] [-s]",
@@ -151,9 +152,7 @@ static void usage()
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
register SVCXPRT *transp = NULL;
struct sockaddr_in saddr;
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
index ab70560..2ba3bac 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
@@ -64,8 +64,8 @@ struct dom_binding {};
char *tempname;
-void reaper(sig)
- int sig;
+void
+reaper(int sig)
{
extern pid_t pid;
extern int pstat;
@@ -85,8 +85,8 @@ void reaper(sig)
return;
}
-void install_reaper(on)
- int on;
+void
+install_reaper(int on)
{
if (on) {
signal(SIGCHLD, reaper);
@@ -98,9 +98,8 @@ void install_reaper(on)
static struct passwd yp_password;
-static void copy_yp_pass(p, x, m)
-char *p;
-int x, m;
+static void
+copy_yp_pass(char *p, int x, int m)
{
register char *t, *s = p;
static char *buf;
@@ -148,8 +147,8 @@ int x, m;
return;
}
-static int validchars(arg)
- char *arg;
+static int
+validchars(char *arg)
{
int i;
@@ -171,9 +170,8 @@ static int validchars(arg)
return(0);
}
-static int validate_master(opw, npw)
- struct passwd *opw;
- struct x_master_passwd *npw;
+static int
+validate_master(struct passwd *opw, struct x_master_passwd *npw)
{
if (npw->pw_name[0] == '+' || npw->pw_name[0] == '-') {
@@ -198,9 +196,8 @@ static int validate_master(opw, npw)
return(0);
}
-static int validate(opw, npw)
- struct passwd *opw;
- struct x_passwd *npw;
+static int
+validate(struct passwd *opw, struct x_passwd *npw)
{
if (npw->pw_name[0] == '+' || npw->pw_name[0] == '-') {
@@ -259,8 +256,8 @@ static int validate(opw, npw)
* all agree), then we use that domain. If we match the user in
* more than one database, we must abort.
*/
-static char *find_domain(pw)
- struct x_passwd *pw;
+static char *
+find_domain(struct x_passwd *pw)
{
struct stat statbuf;
struct dirent *dirp;
@@ -314,9 +311,8 @@ static char *find_domain(pw)
return((char *)&domain);
}
-static int update_inplace(pw, domain)
- struct passwd *pw;
- char *domain;
+static int
+update_inplace(struct passwd *pw, char *domain)
{
DB *dbp = NULL;
DBT key = { NULL, 0 };
@@ -454,7 +450,8 @@ with the same name - continuing");
return(0);
}
-static char *yp_mktmpnam()
+static char *
+yp_mktmpnam(void)
{
static char path[MAXPATHLEN];
char *p;
@@ -694,8 +691,9 @@ cleaning up and bailing out");
* than the last one. Since only the superuser is allowed to use it,
* it is assumed that the caller knows what he's doing.
*/
-int *yppasswdproc_update_master_1_svc(master_yppasswd *argp,
- struct svc_req *rqstp)
+int *
+yppasswdproc_update_master_1_svc(master_yppasswd *argp,
+ struct svc_req *rqstp)
{
static int result;
int pfd, tfd;
diff --git a/usr.sbin/rpc.ypupdated/update.c b/usr.sbin/rpc.ypupdated/update.c
index 6566f46..5cc0d7a 100644
--- a/usr.sbin/rpc.ypupdated/update.c
+++ b/usr.sbin/rpc.ypupdated/update.c
@@ -85,14 +85,9 @@ static int _openchild(char *, FILE **, FILE **);
* and update it if so. Returns the yp status, which is zero
* if there is no access violation.
*/
-mapupdate(requester, mapname, op, keylen, key, datalen, data)
- char *requester;
- char *mapname;
- u_int op;
- u_int keylen;
- char *key;
- u_int datalen;
- char *data;
+int
+mapupdate(char *requester, char *mapname, u_int op, u_int keylen, char *key,
+ u_int datalen, char *data)
{
char updater[MAXMAPNAMELEN + 40];
FILE *childargs;
@@ -137,23 +132,19 @@ mapupdate(requester, mapname, op, keylen, key, datalen, data)
(void)wait(&status);
#ifdef WEXITSTATUS
- if (WEXITSTATUS(status) != 0) {
+ if (WEXITSTATUS(status) != 0)
#else
- if (status.w_retcode != 0) {
+ if (status.w_retcode != 0)
#endif
return (YPERR_YPERR);
- }
return (yperrno);
}
/*
* returns pid, or -1 for failure
*/
-static
-_openchild(command, fto, ffrom)
- char *command;
- FILE **fto;
- FILE **ffrom;
+static int
+_openchild(char *command, FILE **fto, FILE **ffrom)
{
int i;
pid_t pid;
@@ -168,11 +159,7 @@ _openchild(command, fto, ffrom)
if (pipe(pdfrom) < 0) {
goto error2;
}
-#ifdef VFORK
- switch (pid = vfork()) {
-#else
switch (pid = fork()) {
-#endif
case -1:
goto error3;
@@ -222,8 +209,7 @@ error1:
}
static char *
-basename(path)
- char *path;
+basename(char *path)
{
char *p;
@@ -237,16 +223,6 @@ basename(path)
#else /* YP */
-#ifdef foo
-#define ERR_ACCESS 1
-#define ERR_MALLOC 2
-#define ERR_READ 3
-#define ERR_WRITE 4
-#define ERR_DBASE 5
-#define ERR_KEY 6
-extern char *malloc();
-#endif
-
static int match(char *, char *);
/*
@@ -256,14 +232,8 @@ static int match(char *, char *);
* the local file and then shuts up.
*/
int
-localupdate(name, filename, op, keylen, key, datalen, data)
- char *name; /* Name of the requestor */
- char *filename;
- u_int op;
- u_int keylen; /* Not used */
- char *key;
- u_int datalen; /* Not used */
- char *data;
+localupdate(char *name, char *filename, u_int op, u_int keylen __unused,
+ char *key, u_int datalen __unused, char *data)
{
char line[256];
FILE *rf;
@@ -349,9 +319,7 @@ localupdate(name, filename, op, keylen, key, datalen, data)
}
static int
-match(line, name)
- char *line;
- char *name;
+match(char *line, char *name)
{
int len;
diff --git a/usr.sbin/rpc.ypupdated/yp_dbdelete.c b/usr.sbin/rpc.ypupdated/yp_dbdelete.c
index 8a97b19..d38e2be 100644
--- a/usr.sbin/rpc.ypupdated/yp_dbdelete.c
+++ b/usr.sbin/rpc.ypupdated/yp_dbdelete.c
@@ -48,9 +48,8 @@ static const char rcsid[] =
#include <rpcsvc/yp.h>
#include "ypxfr_extern.h"
-int yp_del_record(dbp,key)
- DB *dbp;
- DBT *key;
+int
+yp_del_record(DB *dbp, DBT *key)
{
int rval;
diff --git a/usr.sbin/rpc.ypupdated/yp_dbupdate.c b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
index b94b4b7..44b2b9c 100644
--- a/usr.sbin/rpc.ypupdated/yp_dbupdate.c
+++ b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
@@ -49,9 +49,8 @@ struct dom_binding {};
#include "ypxfr_extern.h"
#include "ypupdated_extern.h"
-static int yp_domake(map, domain)
- char *map;
- char *domain;
+static int
+yp_domake(char *map, char *domain)
{
int pid;
@@ -74,14 +73,9 @@ static int yp_domake(map, domain)
return(0);
}
-int ypmap_update(netname, map, op, keylen, keyval, datlen, datval)
- char *netname;
- char *map;
- unsigned int op;
- unsigned int keylen;
- char *keyval;
- unsigned int datlen;
- char *datval;
+int
+ypmap_update(char *netname, char *map, unsigned int op, unsigned int keylen,
+ char *keyval, unsigned int datlen, char *datval)
{
DB *dbp;
DBT key = { NULL, 0 }, data = { NULL, 0 };
diff --git a/usr.sbin/rpc.ypupdated/ypupdated_main.c b/usr.sbin/rpc.ypupdated/ypupdated_main.c
index 85cd7bf..64302ab 100644
--- a/usr.sbin/rpc.ypupdated/ypupdated_main.c
+++ b/usr.sbin/rpc.ypupdated/ypupdated_main.c
@@ -79,8 +79,8 @@ extern int _rpcsvcstate; /* Set when a request is serviced */
char *progname = "rpc.ypupdated";
char *yp_dir = "/var/yp/";
-static
-void _msgout(char* msg)
+static void
+_msgout(char* msg)
{
#ifdef RPC_SVC_FG
if (_rpcpmstart)
@@ -119,7 +119,7 @@ closedown(int sig)
}
static void
-ypupdated_svc_run()
+ypupdated_svc_run(void)
{
#ifdef FD_SETSIZE
fd_set readfds;
@@ -157,8 +157,8 @@ ypupdated_svc_run()
}
}
-static void reaper(sig)
- int sig;
+static void
+reaper(int sig)
{
int status;
@@ -178,16 +178,15 @@ static void reaper(sig)
}
}
-void usage()
+void
+usage(void)
{
fprintf(stderr, "rpc.ypupdatedd [-p path]\n");
exit(0);
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
register SVCXPRT *transp = NULL;
int sock;
diff --git a/usr.sbin/rpc.ypupdated/ypupdated_server.c b/usr.sbin/rpc.ypupdated/ypupdated_server.c
index 08f9f56..fb1017d 100644
--- a/usr.sbin/rpc.ypupdated/ypupdated_server.c
+++ b/usr.sbin/rpc.ypupdated/ypupdated_server.c
@@ -66,8 +66,8 @@ int forked = 0;
#define WINDOW (60*60)
#endif
-static enum auth_stat yp_checkauth(svcreq)
- struct svc_req *svcreq;
+static enum auth_stat
+yp_checkauth(struct svc_req *svcreq)
{
struct authdes_cred *des_cred;
@@ -93,9 +93,8 @@ was too large -- possible spoof attempt");
}
}
-unsigned int *ypu_change_1_svc(args, svcreq)
- struct ypupdate_args *args;
- struct svc_req *svcreq;
+unsigned int *
+ypu_change_1_svc(struct ypupdate_args *args, struct svc_req *svcreq)
{
struct authdes_cred *des_cred;
static int res;
@@ -128,9 +127,8 @@ unsigned int *ypu_change_1_svc(args, svcreq)
return (&res);
}
-unsigned int *ypu_insert_1_svc(args, svcreq)
- struct ypupdate_args *args;
- struct svc_req *svcreq;
+unsigned int *
+ypu_insert_1_svc(struct ypupdate_args *args, struct svc_req *svcreq)
{
struct authdes_cred *des_cred;
static int res;
@@ -163,9 +161,8 @@ unsigned int *ypu_insert_1_svc(args, svcreq)
return (&res);
}
-unsigned int *ypu_delete_1_svc(args, svcreq)
- struct ypdelete_args *args;
- struct svc_req *svcreq;
+unsigned int *
+ypu_delete_1_svc(struct ypdelete_args *args, struct svc_req *svcreq)
{
struct authdes_cred *des_cred;
static int res;
@@ -198,9 +195,8 @@ unsigned int *ypu_delete_1_svc(args, svcreq)
return (&res);
}
-unsigned int *ypu_store_1_svc(args, svcreq)
- struct ypupdate_args *args;
- struct svc_req *svcreq;
+unsigned int *
+ypu_store_1_svc(struct ypupdate_args *args, struct svc_req *svcreq)
{
struct authdes_cred *des_cred;
static int res;
diff --git a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
index 511539e..7fa866a 100644
--- a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
+++ b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
@@ -80,8 +80,8 @@ extern int _rpcsvcstate; /* Set when a request is serviced */
char *progname = "rpc.ypxfrd";
char *yp_dir = "/var/yp/";
-static
-void _msgout(char* msg)
+static void
+_msgout(char *msg)
{
#ifdef RPC_SVC_FG
if (_rpcpmstart)
@@ -121,7 +121,7 @@ closedown(int sig)
static void
-ypxfrd_svc_run()
+ypxfrd_svc_run(void)
{
#ifdef FD_SETSIZE
fd_set readfds;
@@ -159,8 +159,7 @@ ypxfrd_svc_run()
}
}
-static void reaper(sig)
- int sig;
+static void reaper(int sig)
{
int status;
int saved_errno;
@@ -185,16 +184,15 @@ static void reaper(sig)
return;
}
-void usage()
+void
+usage(void)
{
fprintf(stderr, "usage: rpc.ypxfrd [-p path]\n");
exit(0);
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
register SVCXPRT *transp = NULL;
int sock;
diff --git a/usr.sbin/yp_mkdb/yp_mkdb.c b/usr.sbin/yp_mkdb/yp_mkdb.c
index 6f0d71b..e37cf35 100644
--- a/usr.sbin/yp_mkdb/yp_mkdb.c
+++ b/usr.sbin/yp_mkdb/yp_mkdb.c
@@ -55,7 +55,8 @@ char *yp_dir = ""; /* No particular default needed. */
int _rpcpmstart = 0;
int debug = 1;
-static void usage()
+static void
+usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n%s\n",
"usage: yp_mkdb -c",
@@ -67,17 +68,16 @@ static void usage()
#define PERM_SECURE (S_IRUSR|S_IWUSR)
-static DB *open_db(path, flags)
- char *path;
- int flags;
+static DB *
+open_db(char *path, int flags)
{
extern HASHINFO openinfo;
return(dbopen(path, flags, PERM_SECURE, DB_HASH, &openinfo));
}
-static void unwind(map)
- char *map;
+static void
+unwind(char *map)
{
DB *dbp;
DBT key, data;
@@ -95,9 +95,8 @@ static void unwind(map)
return;
}
-int main (argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
int ch;
int un = 0;
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;
diff --git a/usr.sbin/yppoll/yppoll.c b/usr.sbin/yppoll/yppoll.c
index ce66c9f..c528b0d 100644
--- a/usr.sbin/yppoll/yppoll.c
+++ b/usr.sbin/yppoll/yppoll.c
@@ -48,15 +48,14 @@ static const char rcsid[] =
#include <rpcsvc/ypclnt.h>
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: yppoll [-h host] [-d domainname] mapname\n");
exit(1);
}
int
-main(argc, argv)
-char **argv;
+main(int argc, char *argv[])
{
char *domainname;
char *hostname = "localhost";
diff --git a/usr.sbin/yppush/yppush_main.c b/usr.sbin/yppush/yppush_main.c
index 38043a5..8620047 100644
--- a/usr.sbin/yppush/yppush_main.c
+++ b/usr.sbin/yppush/yppush_main.c
@@ -88,8 +88,8 @@ struct jobs *yppush_joblist; /* Linked list of running jobs. */
/*
* Local error messages.
*/
-static char *yppusherr_string(err)
- int err;
+static char *
+yppusherr_string(int err)
{
switch (err) {
case YPPUSH_TIMEDOUT: return("transfer or callback timed out");
@@ -103,9 +103,8 @@ static char *yppusherr_string(err)
/*
* Report state of a job.
*/
-static int yppush_show_status(status, tid)
- ypxfrstat status;
- unsigned long tid;
+static int
+yppush_show_status(ypxfrstat status, unsigned long tid)
{
struct jobs *job;
@@ -142,8 +141,8 @@ static int yppush_show_status(status, tid)
}
/* Exit routine. */
-static void yppush_exit(now)
- int now;
+static void
+yppush_exit(int now)
{
struct jobs *jptr;
int still_pending = 1;
@@ -203,8 +202,8 @@ to %s (transid = %lu) still pending", jptr->server, jptr->tid);
* Handler for 'normal' signals.
*/
-static void handler(sig)
- int sig;
+static void
+handler(int sig)
{
if (sig == SIGTERM || sig == SIGINT || sig == SIGABRT) {
yppush_jobs = 0;
@@ -222,7 +221,8 @@ static void handler(sig)
/*
* Dispatch loop for callback RPC services.
*/
-static void yppush_svc_run()
+static void
+yppush_svc_run(void)
{
#ifdef FD_SETSIZE
fd_set readfds;
@@ -262,8 +262,8 @@ retry:
* events here, which will occur when the callback handler has
* something interesting to tell us.
*/
-static void async_handler(sig)
- int sig;
+static void
+async_handler(int sig)
{
yppush_svc_run();
@@ -296,8 +296,8 @@ yppushproc_xfrresp_1_svc(yppushresp_xfr *argp, struct svc_req *rqstp)
/*
* Transmit a YPPROC_XFR request to ypserv.
*/
-static int yppush_send_xfr(job)
- struct jobs *job;
+static int
+yppush_send_xfr(struct jobs *job)
{
ypreq_xfr req;
/* ypresp_xfr *resp; */
@@ -384,10 +384,8 @@ create udp handle to NIS server"));
* request to the internal list, send the YPPROC_XFR request to ypserv
* do other magic things.
*/
-int yp_push(server, map, tid)
- char *server;
- char *map;
- unsigned long tid;
+int
+yp_push(char *server, char *map, unsigned long tid)
{
unsigned long prognum;
int sock = RPC_ANYSOCK;
@@ -470,13 +468,9 @@ int yp_push(server, map, tid)
* Called for each entry in the ypservers map from yp_get_map(), which
* is our private yp_all() routine.
*/
-int yppush_foreach(status, key, keylen, val, vallen, data)
- int status;
- char *key;
- int keylen;
- char *val;
- int vallen;
- char *data;
+int
+yppush_foreach(int status, char *key, int keylen, char *val, int vallen,
+ char *data)
{
char server[YPMAXRECORD + 2];
@@ -530,9 +524,7 @@ static void usage()
* Entry point. (About time!)
*/
int
-main(argc,argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch;
DBT key, data;
@@ -666,7 +658,7 @@ main(argc,argv)
tmp = yppush_hostlist;
while (tmp) {
yppush_foreach(YP_TRUE, NULL, 0, tmp->name,
- strlen(tmp->name));
+ strlen(tmp->name), NULL);
tmp = tmp->next;
}
} else {
diff --git a/usr.sbin/ypserv/yp_access.c b/usr.sbin/ypserv/yp_access.c
index 610f209..d5e8f5a 100644
--- a/usr.sbin/ypserv/yp_access.c
+++ b/usr.sbin/ypserv/yp_access.c
@@ -90,7 +90,8 @@ char *yp_procs[] = { "ypoldproc_null",
#ifdef TCP_WRAPPER
-void load_securenets()
+void
+load_securenets(void)
{
}
#else
@@ -109,7 +110,8 @@ struct securenet *securenets;
* list. If the file doesn't exist, we set up a dummy entry that
* allows all hosts to connect.
*/
-void load_securenets()
+void
+load_securenets(void)
{
FILE *fp;
char path[MAXPATHLEN + 2];
@@ -211,15 +213,12 @@ void load_securenets()
*/
#ifdef DB_CACHE
-int yp_access(map, domain, rqstp)
+int
+yp_access(const char *map, const char *domain, const struct svc_req *rqstp)
#else
-int yp_access(map, rqstp)
+int
+yp_access(const char *map, const struct svc_req *rqstp)
#endif
- const char *map;
-#ifdef DB_CACHE
- const char *domain;
-#endif
- const struct svc_req *rqstp;
{
struct sockaddr_in *rqhost;
int status = 0;
@@ -304,8 +303,8 @@ not privileged", map, inet_ntoa(rqhost->sin_addr), ntohs(rqhost->sin_port));
}
-int yp_validdomain(domain)
- const char *domain;
+int
+yp_validdomain(const char *domain)
{
struct stat statbuf;
char dompath[MAXPATHLEN + 2];
diff --git a/usr.sbin/ypserv/yp_dblookup.c b/usr.sbin/ypserv/yp_dblookup.c
index 984736b..23ab2a2 100644
--- a/usr.sbin/ypserv/yp_dblookup.c
+++ b/usr.sbin/ypserv/yp_dblookup.c
@@ -89,7 +89,8 @@ struct circleq_entry {
/*
* Initialize the circular queue.
*/
-void yp_init_dbs()
+void
+yp_init_dbs(void)
{
TAILQ_INIT(&qhead);
return;
@@ -99,7 +100,8 @@ void yp_init_dbs()
* Dynamically allocate an entry for the circular queue.
* Return a NULL pointer on failure.
*/
-static struct circleq_entry *yp_malloc_qent()
+static struct circleq_entry *
+yp_malloc_qent(void)
{
register struct circleq_entry *q;
@@ -124,8 +126,8 @@ static struct circleq_entry *yp_malloc_qent()
* Free a previously allocated circular queue
* entry.
*/
-static void yp_free_qent(q)
- struct circleq_entry *q;
+static void
+yp_free_qent(struct circleq_entry *q)
{
/*
* First, close the database. In theory, this is also
@@ -162,7 +164,8 @@ static void yp_free_qent(q)
* all its resources. (This always removes the last entry
* in the queue.)
*/
-static void yp_flush()
+static void
+yp_flush(void)
{
register struct circleq_entry *qptr;
@@ -177,7 +180,8 @@ static void yp_flush()
/*
* Close all databases, erase all database names and empty the queue.
*/
-void yp_flush_all()
+void
+yp_flush_all(void)
{
register struct circleq_entry *qptr;
@@ -196,8 +200,8 @@ static char *secure_string = "YP_SECURE";
static int inter_sz = sizeof("YP_INTERDOMAIN") - 1;
static int secure_sz = sizeof("YP_SECURE") - 1;
-static int yp_setflags(dbp)
- DB *dbp;
+static int
+yp_setflags(DB *dbp)
{
DBT key = { NULL, 0 }, data = { NULL, 0 };
int flags = 0;
@@ -217,10 +221,8 @@ static int yp_setflags(dbp)
return(flags);
}
-int yp_testflag(map, domain, flag)
- char *map;
- char *domain;
- int flag;
+int
+yp_testflag(char *map, char *domain, int flag)
{
char buf[MAXPATHLEN + 2];
register struct circleq_entry *qptr;
@@ -256,10 +258,8 @@ int yp_testflag(map, domain, flag)
* a new entry when all our slots are already filled, we have to kick
* out the entry in the last slot to make room.
*/
-static int yp_cache_db(dbp, name, size)
- DB *dbp;
- char *name;
- int size;
+static int
+yp_cache_db(DB *dbp, char *name, int size)
{
register struct circleq_entry *qptr;
@@ -317,10 +317,8 @@ static int yp_cache_db(dbp, name, size)
* so that it will be easier to find if another request for
* the same database comes in later.
*/
-static DB *yp_find_db(name, key, size)
- char *name;
- char *key;
- int size;
+static DB *
+yp_find_db(char *name, char *key, int size)
{
register struct circleq_entry *qptr;
@@ -351,11 +349,9 @@ static DB *yp_find_db(name, key, size)
* If so, we fetch the handle from the cache. If not, we try to open
* the database and save the handle in the cache for later use.
*/
-DB *yp_open_db_cache(domain, map, key, size)
- const char *domain;
- const char *map;
- const char *key;
- const int size;
+DB *
+yp_open_db_cache(const char *domain, const char *map, const char *key,
+ const int size)
{
DB *dbp = NULL;
char buf[MAXPATHLEN + 2];
@@ -387,9 +383,8 @@ DB *yp_open_db_cache(domain, map, key, size)
/*
* Open a DB database.
*/
-DB *yp_open_db(domain, map)
- const char *domain;
- const char *map;
+DB *
+yp_open_db(const char *domain, const char *map)
{
DB *dbp = NULL;
char buf[MAXPATHLEN + 2];
@@ -455,16 +450,13 @@ again:
*/
#ifdef DB_CACHE
-int yp_get_record(dbp,key,data,allow)
- DB *dbp;
+int
+yp_get_record(DB *dbp, const DBT *key, DBT *data, int allow)
#else
-int yp_get_record(domain,map,key,data,allow)
- const char *domain;
- const char *map;
+int
+yp_get_record(const char *domain, const char *map,
+ const DBT *key, DBT *data, int allow)
#endif
- const DBT *key;
- DBT *data;
- int allow;
{
#ifndef DB_CACHE
DB *dbp;
@@ -522,11 +514,8 @@ int yp_get_record(domain,map,key,data,allow)
return(YP_TRUE);
}
-int yp_first_record(dbp,key,data,allow)
- const DB *dbp;
- DBT *key;
- DBT *data;
- int allow;
+int
+yp_first_record(const DB *dbp, DBT *key, DBT *data, int allow)
{
int rval;
#ifndef DB_CACHE
@@ -576,12 +565,8 @@ int yp_first_record(dbp,key,data,allow)
return(YP_TRUE);
}
-int yp_next_record(dbp,key,data,all,allow)
- const DB *dbp;
- DBT *key;
- DBT *data;
- int all;
- int allow;
+int
+yp_next_record(const DB *dbp, DBT *key, DBT *data, int all, int allow)
{
static DBT lkey = { NULL, 0 };
static DBT ldata = { NULL, 0 };
@@ -672,11 +657,8 @@ int yp_next_record(dbp,key,data,all,allow)
static DB *yp_currmap_db = NULL;
static int yp_allow_db = 0;
-ypstat yp_select_map(map, domain, key, allow)
- char *map;
- char *domain;
- keydat *key;
- int allow;
+ypstat
+yp_select_map(char *map, char *domain, keydat *key, int allow)
{
if (key == NULL)
yp_currmap_db = yp_open_db_cache(domain, map, NULL, 0);
@@ -689,9 +671,8 @@ ypstat yp_select_map(map, domain, key, allow)
return(yp_errno);
}
-ypstat yp_getbykey(key, val)
- keydat *key;
- valdat *val;
+ypstat
+yp_getbykey(keydat *key, valdat *val)
{
DBT db_key = { NULL, 0 }, db_val = { NULL, 0 };
ypstat rval;
@@ -710,9 +691,8 @@ ypstat yp_getbykey(key, val)
return(rval);
}
-ypstat yp_firstbykey(key, val)
- keydat *key;
- valdat *val;
+ypstat
+yp_firstbykey(keydat *key, valdat *val)
{
DBT db_key = { NULL, 0 }, db_val = { NULL, 0 };
ypstat rval;
@@ -729,9 +709,8 @@ ypstat yp_firstbykey(key, val)
return(rval);
}
-ypstat yp_nextbykey(key, val)
- keydat *key;
- valdat *val;
+ypstat
+yp_nextbykey(keydat *key, valdat *val)
{
DBT db_key = { NULL, 0 }, db_val = { NULL, 0 };
ypstat rval;
diff --git a/usr.sbin/ypserv/yp_dnslookup.c b/usr.sbin/ypserv/yp_dnslookup.c
index 0abffcd..016cbb0c 100644
--- a/usr.sbin/ypserv/yp_dnslookup.c
+++ b/usr.sbin/ypserv/yp_dnslookup.c
@@ -66,8 +66,8 @@ static const char rcsid[] =
#include <rpcsvc/yp.h>
#include "yp_extern.h"
-static char *parse(hp)
- struct hostent *hp;
+static char *
+parse(struct hostent *hp)
{
static char result[MAXHOSTNAMELEN * 2];
int len,i;
@@ -124,7 +124,8 @@ struct circleq_dnsentry {
static int pending = 0;
-int yp_init_resolver()
+int
+yp_init_resolver(void)
{
TAILQ_INIT(&qhead);
if (!(_res.options & RES_INIT) && res_init() == -1) {
@@ -142,7 +143,8 @@ int yp_init_resolver()
return(0);
}
-static struct circleq_dnsentry *yp_malloc_dnsent()
+static struct
+circleq_dnsentry *yp_malloc_dnsent(void)
{
register struct circleq_dnsentry *q;
@@ -159,9 +161,8 @@ static struct circleq_dnsentry *yp_malloc_dnsent()
/*
* Transmit a query.
*/
-static unsigned long yp_send_dns_query(name, type)
- char *name;
- int type;
+static unsigned long
+yp_send_dns_query(char *name, int type)
{
char buf[MAXPACKET];
int n;
@@ -195,9 +196,8 @@ static unsigned long yp_send_dns_query(name, type)
return(id);
}
-static struct circleq_dnsentry *yp_find_dnsqent(id, type)
- unsigned long id;
- int type;
+static struct circleq_dnsentry *
+yp_find_dnsqent(unsigned long id, int type)
{
register struct circleq_dnsentry *q;
@@ -217,9 +217,8 @@ static struct circleq_dnsentry *yp_find_dnsqent(id, type)
return (NULL);
}
-static void yp_send_dns_reply(q, buf)
- struct circleq_dnsentry *q;
- char *buf;
+static void
+yp_send_dns_reply(struct circleq_dnsentry *q, char *buf)
{
ypresponse result_v1;
ypresp_val result_v2;
@@ -254,8 +253,8 @@ static void yp_send_dns_reply(q, buf)
*/
bzero((char *)&result_v1, sizeof(result_v1));
result_v1.yp_resptype = YPRESP_VAL;
-# define YPVAL ypresponse_u.yp_resp_valtype
+#define YPVAL ypresponse_u.yp_resp_valtype
if (buf == NULL)
result_v1.YPVAL.stat = YP_NOKEY;
else {
@@ -314,7 +313,8 @@ static void yp_send_dns_reply(q, buf)
* Decrement TTL on all queue entries, possibly nuking
* any that have been around too long without being serviced.
*/
-void yp_prune_dnsq()
+void
+yp_prune_dnsq(void)
{
register struct circleq_dnsentry *q, *n;
@@ -341,7 +341,8 @@ void yp_prune_dnsq()
* Data is pending on the DNS socket; check for valid replies
* to our queries and dispatch them to waiting clients.
*/
-void yp_run_dnsq()
+void
+yp_run_dnsq(void)
{
register struct circleq_dnsentry *q;
char buf[sizeof(HEADER) + MAXPACKET];
@@ -425,9 +426,8 @@ void yp_run_dnsq()
/*
* Queue and transmit an asynchronous DNS hostname lookup.
*/
-ypstat yp_async_lookup_name(rqstp, name)
- struct svc_req *rqstp;
- char *name;
+ypstat
+yp_async_lookup_name(struct svc_req *rqstp, char *name)
{
register struct circleq_dnsentry *q;
int type, len;
@@ -479,9 +479,8 @@ ypstat yp_async_lookup_name(rqstp, name)
/*
* Queue and transmit an asynchronous DNS IP address lookup.
*/
-ypstat yp_async_lookup_addr(rqstp, addr)
- struct svc_req *rqstp;
- char *addr;
+ypstat
+yp_async_lookup_addr(struct svc_req *rqstp, char *addr)
{
register struct circleq_dnsentry *q;
char buf[MAXHOSTNAMELEN];
diff --git a/usr.sbin/ypserv/yp_error.c b/usr.sbin/ypserv/yp_error.c
index ce5b343..020d5f7 100644
--- a/usr.sbin/ypserv/yp_error.c
+++ b/usr.sbin/ypserv/yp_error.c
@@ -41,8 +41,9 @@ static const char rcsid[] =
* stolen from /usr/libexec/mail.local via ypserv
*/
-#include <stdio.h>
#include <sys/types.h>
+#include <stdio.h>
+#include <stdarg.h>
#include <syslog.h>
#include "yp_extern.h"
@@ -51,18 +52,9 @@ extern int _rpcpmstart;
extern char *progname;
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-static void __verr(const char *fmt, _BSD_VA_LIST_ ap) __printflike(1, 0);
-
-static void __verr(fmt, ap)
- const char *fmt;
- _BSD_VA_LIST_ ap;
+static void __verr(const char *fmt, va_list ap) __printflike(1, 0);
+static void __verr(const char *fmt, va_list ap)
{
if (debug && !_rpcpmstart) {
fprintf(stderr,"%s: ",progname);
@@ -74,20 +66,10 @@ static void __verr(fmt, ap)
}
void
-#ifdef __STDC__
yp_error(const char *fmt, ...)
-#else
-yp_error(fmt, va_list)
- const char *fmt;
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
__verr(fmt,ap);
va_end(ap);
}
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c
index c31e3fd..e7f6b0b 100644
--- a/usr.sbin/ypserv/yp_main.c
+++ b/usr.sbin/ypserv/yp_main.c
@@ -101,7 +101,7 @@ void _msgout(char* msg)
pid_t yp_pid;
static void
-yp_svc_run()
+yp_svc_run(void)
{
#ifdef FD_SETSIZE
fd_set readfds;
@@ -152,14 +152,15 @@ yp_svc_run()
}
}
-static void unregister()
+static void
+unregister(void)
{
(void) pmap_unset(YPPROG, YPVERS);
(void) pmap_unset(YPPROG, YPOLDVERS);
}
-static void reaper(sig)
- int sig;
+static void
+reaper(int sig)
{
int status;
int saved_errno;
@@ -186,7 +187,8 @@ static void reaper(sig)
return;
}
-static void usage()
+static void
+usage(void)
{
fprintf(stderr, "usage: ypserv [-h] [-d] [-n] [-p path]\n");
exit(1);
@@ -223,9 +225,7 @@ closedown(int sig)
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
register SVCXPRT *transp = NULL;
int sock;
diff --git a/usr.sbin/ypserv/yp_server.c b/usr.sbin/ypserv/yp_server.c
index 37ab7ef..80d9da9 100644
--- a/usr.sbin/ypserv/yp_server.c
+++ b/usr.sbin/ypserv/yp_server.c
@@ -56,7 +56,8 @@ int children = 0;
#define ORDER_STRING "YP_LAST_MODIFIED"
#define ORDER_SZ sizeof(ORDER_STRING) - 1
-static pid_t yp_fork()
+static pid_t
+yp_fork(void)
{
if (yp_pid != getpid()) {
yp_error("child %d trying to fork!", getpid());
@@ -259,12 +260,9 @@ ypproc_next_2_svc(ypreq_key *argp, struct svc_req *rqstp)
return (&result);
}
-static void ypxfr_callback(rval,addr,transid,prognum,port)
- ypxfrstat rval;
- struct sockaddr_in *addr;
- unsigned int transid;
- unsigned int prognum;
- unsigned long port;
+static void
+ypxfr_callback(ypxfrstat rval, struct sockaddr_in *addr, unsigned int transid,
+ unsigned int prognum, unsigned long port)
{
CLIENT *clnt;
int sock = RPC_ANYSOCK;
@@ -655,8 +653,7 @@ ypproc_order_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
return (&result);
}
-static void yp_maplist_free(yp_maplist)
- struct ypmaplist *yp_maplist;
+static void yp_maplist_free(struct ypmaplist *yp_maplist)
{
register struct ypmaplist *next;
@@ -669,8 +666,8 @@ static void yp_maplist_free(yp_maplist)
return;
}
-static struct ypmaplist *yp_maplist_create(domain)
- const char *domain;
+static struct ypmaplist *
+yp_maplist_create(const char *domain)
{
char yp_mapdir[MAXPATHLEN + 2];
char yp_mapname[MAXPATHLEN + 2];
diff --git a/usr.sbin/ypserv/yp_svc_udp.c b/usr.sbin/ypserv/yp_svc_udp.c
index b62f9f9..ea4fbcb 100644
--- a/usr.sbin/ypserv/yp_svc_udp.c
+++ b/usr.sbin/ypserv/yp_svc_udp.c
@@ -48,8 +48,7 @@ static const char rcsid[] =
*/
unsigned long
-svcudp_get_xid(xprt)
- SVCXPRT *xprt;
+svcudp_get_xid(SVCXPRT *xprt)
{
struct svc_dg_data *su;
@@ -60,9 +59,7 @@ svcudp_get_xid(xprt)
}
unsigned long
-svcudp_set_xid(xprt, xid)
- SVCXPRT *xprt;
- unsigned long xid;
+svcudp_set_xid(SVCXPRT *xprt, unsigned long xid)
{
struct svc_dg_data *su;
unsigned long old_xid;
diff --git a/usr.sbin/ypset/ypset.c b/usr.sbin/ypset/ypset.c
index 5b3e7cb..b75926a 100644
--- a/usr.sbin/ypset/ypset.c
+++ b/usr.sbin/ypset/ypset.c
@@ -50,16 +50,14 @@ struct dom_binding{};
extern bool_t xdr_domainname();
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: ypset [-h host] [-d domain] server\n");
exit(1);
}
int
-bind_tohost(sin, dom, server)
-struct sockaddr_in *sin;
-char *dom, *server;
+bind_tohost(struct sockaddr_in *sin, char *dom, char *server)
{
struct ypbind_setdom ypsd;
struct timeval tv;
@@ -113,8 +111,7 @@ char *dom, *server;
}
int
-main(argc, argv)
-char **argv;
+main(int argc, char *argv[])
{
struct sockaddr_in sin;
struct hostent *hent;
OpenPOWER on IntegriCloud