summaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
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 'lib')
-rw-r--r--lib/libc/yp/xdryp.c8
-rw-r--r--lib/libc/yp/yplib.c108
-rw-r--r--lib/librpcsvc/yp_passwd.c5
-rw-r--r--lib/librpcsvc/yp_update.c10
4 files changed, 39 insertions, 92 deletions
diff --git a/lib/libc/yp/xdryp.c b/lib/libc/yp/xdryp.c
index 3d865fe..630180c 100644
--- a/lib/libc/yp/xdryp.c
+++ b/lib/libc/yp/xdryp.c
@@ -51,9 +51,7 @@ typedef struct {
} datum;
bool_t
-xdr_datum(xdrs, objp)
-XDR *xdrs;
-datum *objp;
+xdr_datum(XDR *xdrs, datum *objp)
{
if (!xdr_bytes(xdrs, (char **)&objp->dptr, (u_int *)&objp->dsize, YPMAXRECORD)) {
return (FALSE);
@@ -62,9 +60,7 @@ datum *objp;
}
bool_t
-xdr_ypresp_all_seq(xdrs, objp)
-XDR *xdrs;
-u_long *objp;
+xdr_ypresp_all_seq(XDR *xdrs, u_long *objp)
{
struct ypresp_all out;
u_long status;
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
index a762611..0a4bc7e 100644
--- a/lib/libc/yp/yplib.c
+++ b/lib/libc/yp/yplib.c
@@ -105,10 +105,9 @@ static char _yp_domain[MAXHOSTNAMELEN];
int _yplib_timeout = 10;
#ifdef YPMATCHCACHE
-static void ypmatch_cache_delete(ypdb, prev, cur)
- struct dom_binding *ypdb;
- struct ypmatch_ent *prev;
- struct ypmatch_ent *cur;
+static void
+ypmatch_cache_delete(struct dom_binding *ypdb, struct ypmatch_ent *prev,
+ struct ypmatch_ent *cur)
{
if (prev == NULL)
ypdb->cache = cur->ypc_next;
@@ -125,8 +124,8 @@ static void ypmatch_cache_delete(ypdb, prev, cur)
return;
}
-static void ypmatch_cache_flush(ypdb)
- struct dom_binding *ypdb;
+static void
+ypmatch_cache_flush(struct dom_binding *ypdb)
{
struct ypmatch_ent *n, *c = ypdb->cache;
@@ -139,8 +138,8 @@ static void ypmatch_cache_flush(ypdb)
return;
}
-static void ypmatch_cache_expire(ypdb)
- struct dom_binding *ypdb;
+static void
+ypmatch_cache_expire(struct dom_binding *ypdb)
{
struct ypmatch_ent *c = ypdb->cache;
struct ypmatch_ent *n, *p = NULL;
@@ -162,11 +161,9 @@ static void ypmatch_cache_expire(ypdb)
return;
}
-static void ypmatch_cache_insert(ypdb, map, key, val)
- struct dom_binding *ypdb;
- char *map;
- keydat *key;
- valdat *val;
+static void
+ypmatch_cache_insert(struct dom_binding *ypdb, char *map, keydat *key,
+ valdat *val)
{
struct ypmatch_ent *new;
@@ -235,11 +232,9 @@ static void ypmatch_cache_insert(ypdb, map, key, val)
return;
}
-static bool_t ypmatch_cache_lookup(ypdb, map, key, val)
- struct dom_binding *ypdb;
- char *map;
- keydat *key;
- valdat *val;
+static bool_t
+ypmatch_cache_lookup(struct dom_binding *ypdb, char *map, keydat *key,
+ valdat *val)
{
struct ypmatch_ent *c = ypdb->cache;
@@ -266,8 +261,7 @@ static bool_t ypmatch_cache_lookup(ypdb, map, key, val)
#endif
char *
-ypbinderr_string(incode)
- int incode;
+ypbinderr_string(int incode)
{
static char err[80];
switch (incode) {
@@ -285,9 +279,7 @@ ypbinderr_string(incode)
}
int
-_yp_dobind(dom, ypdb)
- char *dom;
- struct dom_binding **ypdb;
+_yp_dobind(char *dom, struct dom_binding **ypdb)
{
static pid_t pid = -1;
char path[MAXPATHLEN];
@@ -563,8 +555,7 @@ gotit:
}
static void
-_yp_unbind(ypb)
- struct dom_binding *ypb;
+_yp_unbind(struct dom_binding *ypb)
{
struct sockaddr_in check;
int checklen = sizeof(struct sockaddr_in);
@@ -594,15 +585,13 @@ _yp_unbind(ypb)
}
int
-yp_bind(dom)
- char *dom;
+yp_bind(char *dom)
{
return (_yp_dobind(dom, NULL));
}
void
-yp_unbind(dom)
- char *dom;
+yp_unbind(char *dom)
{
struct dom_binding *ypb, *ypbp;
@@ -623,13 +612,8 @@ yp_unbind(dom)
}
int
-yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- const char *inkey;
- int inkeylen;
- char **outval;
- int *outvallen;
+yp_match(char *indomain, char *inmap, const char *inkey, int inkeylen,
+ char **outval, int *outvallen)
{
struct dom_binding *ysd;
struct ypresp_val yprv;
@@ -701,8 +685,7 @@ again:
}
int
-yp_get_default_domain(domp)
-char **domp;
+yp_get_default_domain(char **domp)
{
*domp = NULL;
if (_yp_domain[0] == '\0')
@@ -713,13 +696,8 @@ char **domp;
}
int
-yp_first(indomain, inmap, outkey, outkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
+yp_first(char *indomain, char *inmap, char **outkey, int *outkeylen,
+ char **outval, int *outvallen)
{
struct ypresp_key_val yprkv;
struct ypreq_nokey yprnk;
@@ -770,15 +748,8 @@ again:
}
int
-yp_next(indomain, inmap, inkey, inkeylen, outkey, outkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- char *inkey;
- int inkeylen;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
+yp_next(char *indomain, char *inmap, char *inkey, int inkeylen,
+ char **outkey, int *outkeylen, char **outval, int *outvallen)
{
struct ypresp_key_val yprkv;
struct ypreq_key yprk;
@@ -832,10 +803,7 @@ again:
}
int
-yp_all(indomain, inmap, incallback)
- char *indomain;
- char *inmap;
- struct ypall_callback *incallback;
+yp_all(char *indomain, char *inmap, struct ypall_callback *incallback)
{
struct ypreq_nokey yprnk;
struct dom_binding *ysd;
@@ -893,10 +861,7 @@ again:
}
int
-yp_order(indomain, inmap, outorder)
- char *indomain;
- char *inmap;
- int *outorder;
+yp_order(char *indomain, char *inmap, int *outorder)
{
struct dom_binding *ysd;
struct ypresp_order ypro;
@@ -948,10 +913,7 @@ again:
}
int
-yp_master(indomain, inmap, outname)
- char *indomain;
- char *inmap;
- char **outname;
+yp_master(char *indomain, char *inmap, char **outname)
{
struct dom_binding *ysd;
struct ypresp_master yprm;
@@ -991,10 +953,9 @@ again:
xdr_free(xdr_ypresp_master, (char *)&yprm);
return (r);
}
+
int
-yp_maplist(indomain, outmaplist)
- char *indomain;
- struct ypmaplist **outmaplist;
+yp_maplist(char *indomain, struct ypmaplist **outmaplist)
{
struct dom_binding *ysd;
struct ypresp_maplist ypml;
@@ -1031,8 +992,7 @@ again:
}
char *
-yperr_string(incode)
- int incode;
+yperr_string(int incode)
{
static char err[80];
@@ -1077,8 +1037,7 @@ yperr_string(incode)
}
int
-ypprot_err(incode)
- unsigned int incode;
+ypprot_err(unsigned int incode)
{
switch (incode) {
case YP_TRUE:
@@ -1108,8 +1067,7 @@ ypprot_err(incode)
}
int
-_yp_check(dom)
- char **dom;
+_yp_check(char **dom)
{
char *unused;
diff --git a/lib/librpcsvc/yp_passwd.c b/lib/librpcsvc/yp_passwd.c
index b43669c..1c6e6aa 100644
--- a/lib/librpcsvc/yp_passwd.c
+++ b/lib/librpcsvc/yp_passwd.c
@@ -50,9 +50,8 @@ __FBSDID("$FreeBSD$");
* fooling gcc.
*/
-int _yppasswd(oldpass, newpw)
- char *oldpass;
- struct x_passwd *newpw;
+int
+_yppasswd(char *oldpass, struct x_passwd *newpw)
{
char *server;
char *domain;
diff --git a/lib/librpcsvc/yp_update.c b/lib/librpcsvc/yp_update.c
index bfa1bb1..5f1c7db 100644
--- a/lib/librpcsvc/yp_update.c
+++ b/lib/librpcsvc/yp_update.c
@@ -55,14 +55,8 @@ __FBSDID("$FreeBSD$");
#endif
int
-yp_update(domain, map, ypop, key, keylen, data, datalen)
- char *domain;
- char *map;
- unsigned int ypop;
- char *key;
- int keylen;
- char *data;
- int datalen;
+yp_update(char *domain, char *map, unsigned int ypop, char *key, int keylen,
+ char *data, int datalen)
{
char *master;
int rval;
OpenPOWER on IntegriCloud