diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-20 01:35:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-20 01:35:36 +0000 |
commit | ccc5cbde0e4564f3af83fa82bd2a7d2f810b4b62 (patch) | |
tree | a0ecfcd8bfcc8424edde9c09913f5a60e7b2f2b5 /lib/libc/yp/ypmatch_cache.c | |
parent | 4293f75624bc531155794d4ba9cc34d09d7b6a8b (diff) |
ansi
Diffstat (limited to 'lib/libc/yp/ypmatch_cache.c')
-rw-r--r-- | lib/libc/yp/ypmatch_cache.c | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/lib/libc/yp/ypmatch_cache.c b/lib/libc/yp/ypmatch_cache.c index 2c04db26c34..2800bf35542 100644 --- a/lib/libc/yp/ypmatch_cache.c +++ b/lib/libc/yp/ypmatch_cache.c @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.7 1998/01/20 18:40:27 deraadt Exp $"; +static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.8 2002/07/20 01:35:35 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -53,12 +53,8 @@ static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.7 1998/01/20 18:40:27 deraad int _yplib_cache = 5; static bool_t -ypmatch_add(map, key, keylen, val, vallen) - const char *map; - const char *key; - u_int keylen; - char *val; - u_int vallen; +ypmatch_add(const char *map, const char *key, u_int keylen, char *val, + u_int vallen) { struct ypmatch_ent *ep; time_t t; @@ -117,12 +113,8 @@ ypmatch_add(map, key, keylen, val, vallen) } static bool_t -ypmatch_find(map, key, keylen, val, vallen) - const char *map; - const char *key; - u_int keylen; - char **val; - u_int *vallen; +ypmatch_find(const char *map, const char *key, u_int keylen, char **val, + u_int *vallen) { struct ypmatch_ent *ep; time_t t; @@ -150,13 +142,8 @@ ypmatch_find(map, key, keylen, val, vallen) } int -yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen) - const char *indomain; - const char *inmap; - const char *inkey; - int inkeylen; - char **outval; - int *outvallen; +yp_match(const char *indomain, const char *inmap, const char *inkey, + int inkeylen, char **outval, int *outvallen) { struct dom_binding *ysd; struct ypresp_val yprv; @@ -164,7 +151,7 @@ yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen) struct ypreq_key yprk; int tries = 0, r; - if (indomain == NULL || *indomain == '\0' || + if (indomain == NULL || *indomain == '\0' || strlen(indomain) > YPMAXDOMAIN || inmap == NULL || *inmap == '\0' || strlen(inmap) > YPMAXMAP || inkey == NULL || inkeylen == 0 || inkeylen >= YPMAXRECORD) @@ -232,15 +219,8 @@ out: } int -yp_next(indomain, inmap, inkey, inkeylen, outkey, outkeylen, outval, outvallen) - const char *indomain; - const char *inmap; - const char *inkey; - int inkeylen; - char **outkey; - int *outkeylen; - char **outval; - int *outvallen; +yp_next(const char *indomain, const char *inmap, const char *inkey, + int inkeylen, char **outkey, int *outkeylen, char **outval, int *outvallen) { struct ypresp_key_val yprkv; struct ypreq_key yprk; |