From d7b064e238d98e1c9942cfb6e53c0767893310b1 Mon Sep 17 00:00:00 2001 From: des Date: Wed, 6 Feb 2002 15:26:07 +0000 Subject: ANSIfy and remove some dead code. Sponsored by: DARPA, NAI Labs --- usr.bin/chpass/pw_yp.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'usr.bin/chpass') diff --git a/usr.bin/chpass/pw_yp.c b/usr.bin/chpass/pw_yp.c index 921f30e..cc60073 100644 --- a/usr.bin/chpass/pw_yp.c +++ b/usr.bin/chpass/pw_yp.c @@ -90,9 +90,8 @@ extern char *tempname; struct passwd local_password; struct passwd yp_password; -void copy_yp_pass(p, x, m) -char *p; -int x, m; +void +copy_yp_pass(char *p, int x, int m) { register char *t, *s = p; static char *buf; @@ -140,9 +139,8 @@ int x, m; return; } -void copy_local_pass(p,m) -char *p; -int m; +void +copy_local_pass(char *p, int m) { register char *t; static char *buf; @@ -179,14 +177,9 @@ int m; * need our own magic version of yp_match() which we can use in any * environment. */ -static int my_yp_match(server, domain, map, key, keylen, result, resultlen) - char *server; - char *domain; - char *map; - char *key; - unsigned long keylen; - char **result; - unsigned long *resultlen; +static int +my_yp_match(char *server, char *domain, char *map, char *key, + unsigned long keylen, char **result, unsigned long *resultlen) { ypreq_key ypkey; ypresp_val *ypval; @@ -255,10 +248,8 @@ static int my_yp_match(server, domain, map, key, keylen, result, resultlen) /* * Check if the user we're working with is local or in NIS. */ -int use_yp (user, uid, which) - char *user; - uid_t uid; - int which; /* 0 = use username, 1 = use uid */ +int +use_yp(char *user, uid_t uid, int which /* 0 = use username, 1 = use uid */) { int user_local = 0, user_yp = 0, user_exists = 0; DB *dbp; @@ -348,12 +339,11 @@ int use_yp (user, uid, which) * Find the name of the NIS master server for this domain * and make sure it's running yppasswdd. */ -char *get_yp_master(getserver) - int getserver; +char * +get_yp_master(int getserver) { char *mastername; int rval, localport; - struct stat st; /* * Sometimes we are called just to probe for rpc.yppasswdd and @@ -427,8 +417,8 @@ char *get_yp_master(getserver) * information without specifying a password, however this only works * for the superuser on the NIS master server. */ -void yp_submit(pw) - struct passwd *pw; +void +yp_submit(struct passwd *pw) { struct yppasswd yppasswd; struct master_yppasswd master_yppasswd; -- cgit v1.1