summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-02-06 15:26:07 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-02-06 15:26:07 +0000
commit3219560bc43c095672e763e113248ad897441b30 (patch)
tree65224836ce73524acc81317eecac56cc88170c63
parent7c1453952d8f4fad7f41d6ea1bb8fac64a84d1a8 (diff)
downloadpw-darwin-3219560bc43c095672e763e113248ad897441b30.tar.gz
pw-darwin-3219560bc43c095672e763e113248ad897441b30.tar.zst
pw-darwin-3219560bc43c095672e763e113248ad897441b30.zip
ANSIfy and remove some dead code.
Sponsored by: DARPA, NAI Labs
-rw-r--r--chpass/pw_yp.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/chpass/pw_yp.c b/chpass/pw_yp.c
index 921f30e..cc60073 100644
--- a/chpass/pw_yp.c
+++ b/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;