diff --git a/usr.sbin/ypserv/ypserv/ypserv.c b/usr.sbin/ypserv/ypserv/ypserv.c index fe130e101728..0a0773921f88 100644 --- a/usr.sbin/ypserv/ypserv/ypserv.c +++ b/usr.sbin/ypserv/ypserv/ypserv.c @@ -1,4 +1,4 @@ -/* $NetBSD: ypserv.c,v 1.17 2002/07/06 00:31:07 wiz Exp $ */ +/* $NetBSD: ypserv.c,v 1.18 2002/07/06 00:42:27 wiz Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ypserv.c,v 1.17 2002/07/06 00:31:07 wiz Exp $"); +__RCSID("$NetBSD: ypserv.c,v 1.18 2002/07/06 00:42:27 wiz Exp $"); #endif #include @@ -268,9 +268,7 @@ ypprog_1(struct svc_req *rqstp, SVCXPRT *transp) } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { SVCXPRT *udptransp, *tcptransp, *udp6transp, *tcp6transp; struct netconfig *udpconf, *tcpconf, *udp6conf, *tcp6conf; @@ -451,8 +449,7 @@ main(argc, argv) } void -sighandler(sig) - int sig; +sighandler(int sig) { /* SIGCHLD */ @@ -460,7 +457,7 @@ sighandler(sig) } void -usage() +usage(void) { #ifdef LIBWRAP @@ -482,8 +479,7 @@ usage() * XXX: this probably should be in libc/yp/yplib.c */ int -_yp_invalid_map(map) - const char *map; +_yp_invalid_map(const char *map) { if (map == NULL || *map == '\0') return 1; diff --git a/usr.sbin/ypserv/ypserv/ypserv_db.c b/usr.sbin/ypserv/ypserv/ypserv_db.c index bd070a019a3e..b364ae1fd8a0 100644 --- a/usr.sbin/ypserv/ypserv/ypserv_db.c +++ b/usr.sbin/ypserv/ypserv/ypserv_db.c @@ -1,4 +1,4 @@ -/* $NetBSD: ypserv_db.c,v 1.13 2002/07/06 00:18:48 wiz Exp $ */ +/* $NetBSD: ypserv_db.c,v 1.14 2002/07/06 00:42:27 wiz Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -35,7 +35,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ypserv_db.c,v 1.13 2002/07/06 00:18:48 wiz Exp $"); +__RCSID("$NetBSD: ypserv_db.c,v 1.14 2002/07/06 00:42:27 wiz Exp $"); #endif /* @@ -110,7 +110,7 @@ int lookup_host(int, int, DBM *, char *, struct ypresp_val *); * ypdb_init: init the queues and lists */ void -ypdb_init() +ypdb_init(void) { LIST_INIT(&doms); @@ -123,9 +123,7 @@ ypdb_init() * ypprivate is FALSE. */ int -yp_private(key, ypprivate) - datum key; - int ypprivate; +yp_private(datum key, int ypprivate) { if (ypprivate) @@ -169,8 +167,7 @@ yp_private(key, ypprivate) * Close specified map. */ void -ypdb_close_map(map) - struct opt_map *map; +ypdb_close_map(struct opt_map *map) { CIRCLEQ_REMOVE(&maps, map, mapsq); /* remove from LRU circleq */ LIST_REMOVE(map, mapsl); /* remove from domain list */ @@ -191,7 +188,7 @@ ypdb_close_map(map) * no more file descriptors free, or we want to close all maps. */ void -ypdb_close_last() +ypdb_close_last(void) { struct opt_map *last = maps.cqh_last; @@ -207,7 +204,7 @@ ypdb_close_last() * Close all open maps. */ void -ypdb_close_all() +ypdb_close_all(void) { #ifdef DEBUG @@ -226,8 +223,7 @@ ypdb_close_all() * Close Database if Open/Close Optimization isn't turned on. */ void -ypdb_close_db(db) - DBM *db; +ypdb_close_db(DBM *db) { #ifdef DEBUG @@ -243,11 +239,8 @@ ypdb_close_db(db) * ypdb_open_db */ DBM * -ypdb_open_db(domain, map, status, map_info) - const char *domain; - const char *map; - int *status; - struct opt_map **map_info; +ypdb_open_db(const char *domain, const char *map, int *status, + struct opt_map **map_info) { static char *domain_key = YP_INTERDOMAIN_KEY; static char *secure_key = YP_SECURE_KEY; @@ -475,11 +468,8 @@ retryopen: * lookup host */ int -lookup_host(nametable, host_lookup, db, keystr, result) - int nametable, host_lookup; - DBM *db; - char *keystr; - struct ypresp_val *result; +lookup_host(int nametable, int host_lookup, DBM *db, char *keystr, + struct ypresp_val *result) { struct hostent *host; struct in_addr *addr_name; @@ -562,11 +552,7 @@ lookup_host(nametable, host_lookup, db, keystr, result) } struct ypresp_val -ypdb_get_record(domain, map, key, ypprivate) - const char *domain; - const char *map; - datum key; - int ypprivate; +ypdb_get_record(const char *domain, const char *map, datum key, int ypprivate) { static struct ypresp_val res; static char keystr[YPMAXRECORD + 1]; @@ -617,10 +603,7 @@ ypdb_get_record(domain, map, key, ypprivate) } struct ypresp_key_val -ypdb_get_first(domain, map, ypprivate) - const char *domain; - const char *map; - int ypprivate; +ypdb_get_first(const char *domain, const char *map, int ypprivate) { static struct ypresp_key_val res; DBM *db; @@ -658,11 +641,7 @@ ypdb_get_first(domain, map, ypprivate) } struct ypresp_key_val -ypdb_get_next(domain, map, key, ypprivate) - const char *domain; - const char *map; - datum key; - int ypprivate; +ypdb_get_next(const char *domain, const char *map, datum key, int ypprivate) { static struct ypresp_key_val res; DBM *db; @@ -713,9 +692,7 @@ ypdb_get_next(domain, map, key, ypprivate) } struct ypresp_order -ypdb_get_order(domain, map) - const char *domain; - const char *map; +ypdb_get_order(const char *domain, const char *map) { static struct ypresp_order res; static char *order_key = YP_LAST_KEY; @@ -748,9 +725,7 @@ ypdb_get_order(domain, map) } struct ypresp_master -ypdb_get_master(domain, map) - const char *domain; - const char *map; +ypdb_get_master(const char *domain, const char *map) { static struct ypresp_master res; static char *master_key = YP_MASTER_KEY; @@ -783,9 +758,7 @@ ypdb_get_master(domain, map) } bool_t -ypdb_xdr_get_all(xdrs, req) - XDR *xdrs; - struct ypreq_nokey *req; +ypdb_xdr_get_all(XDR *xdrs, struct ypreq_nokey *req) { static struct ypresp_all resp; DBM *db; @@ -855,9 +828,7 @@ ypdb_xdr_get_all(xdrs, req) } int -ypdb_secure(domain, map) - const char *domain; - const char *map; +ypdb_secure(const char *domain, const char *map) { DBM *db; int secure, status; diff --git a/usr.sbin/ypserv/ypserv/ypserv_proc.c b/usr.sbin/ypserv/ypserv/ypserv_proc.c index 235545e91c4e..3d136a6e4089 100644 --- a/usr.sbin/ypserv/ypserv/ypserv_proc.c +++ b/usr.sbin/ypserv/ypserv/ypserv_proc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ypserv_proc.c,v 1.9 2001/03/16 22:14:45 tron Exp $ */ +/* $NetBSD: ypserv_proc.c,v 1.10 2002/07/06 00:42:27 wiz Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ypserv_proc.c,v 1.9 2001/03/16 22:14:45 tron Exp $"); +__RCSID("$NetBSD: ypserv_proc.c,v 1.10 2002/07/06 00:42:27 wiz Exp $"); #endif #include @@ -82,9 +82,7 @@ securecheck(struct sockaddr *caller) } void * -ypproc_null_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_null_2_svc(void *argp, struct svc_req *rqstp) { static char result; @@ -95,9 +93,7 @@ ypproc_null_2_svc(argp, rqstp) } void * -ypproc_domain_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_domain_2_svc(void *argp, struct svc_req *rqstp) { static bool_t result; /* is domain_served? */ char *domain = *(char **)argp; @@ -123,9 +119,7 @@ ypproc_domain_2_svc(argp, rqstp) } void * -ypproc_domain_nonack_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_domain_nonack_2_svc(void *argp, struct svc_req *rqstp) { static bool_t result; /* is domain served? */ char *domain = *(char **)argp; @@ -154,9 +148,7 @@ ypproc_domain_nonack_2_svc(argp, rqstp) } void * -ypproc_match_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_match_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_val res; struct sockaddr *caller = svc_getrpccaller(rqstp->rq_xprt)->buf; @@ -184,9 +176,7 @@ ypproc_match_2_svc(argp, rqstp) } void * -ypproc_first_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_first_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_key_val res; struct sockaddr *caller = svc_getrpccaller(rqstp->rq_xprt)->buf; @@ -213,9 +203,7 @@ ypproc_first_2_svc(argp, rqstp) } void * -ypproc_next_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_next_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_key_val res; struct sockaddr *caller = svc_getrpccaller(rqstp->rq_xprt)->buf; @@ -243,9 +231,7 @@ ypproc_next_2_svc(argp, rqstp) } void * -ypproc_xfr_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_xfr_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_xfr res; struct sockaddr *caller = svc_getrpccaller(rqstp->rq_xprt)->buf; @@ -295,9 +281,7 @@ ypproc_xfr_2_svc(argp, rqstp) } void * -ypproc_clear_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_clear_2_svc(void *argp, struct svc_req *rqstp) { static char res; struct sockaddr *caller = svc_getrpccaller(rqstp->rq_xprt)->buf; @@ -325,9 +309,7 @@ ypproc_clear_2_svc(argp, rqstp) } void * -ypproc_all_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_all_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_all res; struct sockaddr *caller = svc_getrpccaller(rqstp->rq_xprt)->buf; @@ -373,9 +355,7 @@ ypproc_all_2_svc(argp, rqstp) } void * -ypproc_master_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_master_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_master res; static char *nopeer = ""; @@ -417,9 +397,7 @@ ypproc_master_2_svc(argp, rqstp) void * -ypproc_order_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_order_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_order res; struct sockaddr *caller = svc_getrpccaller(rqstp->rq_xprt)->buf; @@ -448,9 +426,7 @@ ypproc_order_2_svc(argp, rqstp) } void * -ypproc_maplist_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +ypproc_maplist_2_svc(void *argp, struct svc_req *rqstp) { static struct ypresp_maplist res; char domain_path[MAXPATHLEN];