diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 15:26:07 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 15:26:07 +0000 |
commit | dc584ddbc5eb111cdb9863e2652621d7b5e9ba76 (patch) | |
tree | 9c2a46d61c0b1ec2538854e870b6861acfd2ee7a /usr.sbin/yppush/yppush_main.c | |
parent | ed4d1c46a27632aa553e7c24c969262bfc2d5c97 (diff) | |
download | src-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/yppush/yppush_main.c')
-rw-r--r-- | usr.sbin/yppush/yppush_main.c | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/usr.sbin/yppush/yppush_main.c b/usr.sbin/yppush/yppush_main.c index 38043a57cf70..8620047357e3 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 { |