Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ypserv/ypserv ANSIfy (overlooked some...)
details: https://anonhg.NetBSD.org/src/rev/458cd80a7345
branches: trunk
changeset: 533637:458cd80a7345
user: wiz <wiz%NetBSD.org@localhost>
date: Sat Jul 06 00:42:27 2002 +0000
description:
ANSIfy (overlooked some...)
diffstat:
usr.sbin/ypserv/ypserv/ypserv.c | 16 +++-----
usr.sbin/ypserv/ypserv/ypserv_db.c | 67 ++++++++++-------------------------
usr.sbin/ypserv/ypserv/ypserv_proc.c | 52 +++++++--------------------
3 files changed, 39 insertions(+), 96 deletions(-)
diffs (truncated from 394 to 300 lines):
diff -r 941b90e3c540 -r 458cd80a7345 usr.sbin/ypserv/ypserv/ypserv.c
--- a/usr.sbin/ypserv/ypserv/ypserv.c Sat Jul 06 00:31:07 2002 +0000
+++ b/usr.sbin/ypserv/ypserv/ypserv.c Sat Jul 06 00:42:27 2002 +0000
@@ -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 <moj%stacken.kth.se@localhost>
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#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 <sys/types.h>
@@ -268,9 +268,7 @@
}
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 @@
}
void
-sighandler(sig)
- int sig;
+sighandler(int sig)
{
/* SIGCHLD */
@@ -460,7 +457,7 @@
}
void
-usage()
+usage(void)
{
#ifdef LIBWRAP
@@ -482,8 +479,7 @@
* 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 -r 941b90e3c540 -r 458cd80a7345 usr.sbin/ypserv/ypserv/ypserv_db.c
--- a/usr.sbin/ypserv/ypserv/ypserv_db.c Sat Jul 06 00:31:07 2002 +0000
+++ b/usr.sbin/ypserv/ypserv/ypserv_db.c Sat Jul 06 00:42:27 2002 +0000
@@ -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 <moj%stacken.kth.se@localhost>
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#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 @@
* ypdb_init: init the queues and lists
*/
void
-ypdb_init()
+ypdb_init(void)
{
LIST_INIT(&doms);
@@ -123,9 +123,7 @@
* ypprivate is FALSE.
*/
int
-yp_private(key, ypprivate)
- datum key;
- int ypprivate;
+yp_private(datum key, int ypprivate)
{
if (ypprivate)
@@ -169,8 +167,7 @@
* 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 @@
* 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 @@
* Close all open maps.
*/
void
-ypdb_close_all()
+ypdb_close_all(void)
{
#ifdef DEBUG
@@ -226,8 +223,7 @@
* 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_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 @@
* 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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 -r 941b90e3c540 -r 458cd80a7345 usr.sbin/ypserv/ypserv/ypserv_proc.c
--- a/usr.sbin/ypserv/ypserv/ypserv_proc.c Sat Jul 06 00:31:07 2002 +0000
+++ b/usr.sbin/ypserv/ypserv/ypserv_proc.c Sat Jul 06 00:42:27 2002 +0000
@@ -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 <moj%stacken.kth.se@localhost>
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#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 <sys/stat.h>
@@ -82,9 +82,7 @@
}
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 @@
}
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 @@
}
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 @@
}
void *
-ypproc_match_2_svc(argp, rqstp)
Home |
Main Index |
Thread Index |
Old Index