diff options
author | des <des@FreeBSD.org> | 2002-02-06 15:26:07 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-02-06 15:26:07 +0000 |
commit | d7b064e238d98e1c9942cfb6e53c0767893310b1 (patch) | |
tree | 9c2a46d61c0b1ec2538854e870b6861acfd2ee7a /usr.bin | |
parent | 0f2cb9b020b907000a28323fc57a82fdb7d6626d (diff) | |
download | FreeBSD-src-d7b064e238d98e1c9942cfb6e53c0767893310b1.zip FreeBSD-src-d7b064e238d98e1c9942cfb6e53c0767893310b1.tar.gz |
ANSIfy and remove some dead code.
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/chpass/pw_yp.c | 36 |
1 files changed, 13 insertions, 23 deletions
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; |