diff options
author | Warner Losh <imp@FreeBSD.org> | 2002-02-17 19:09:20 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2002-02-17 19:09:20 +0000 |
commit | 71233f4fa43aca63e050be6bf61d37a880592c4c (patch) | |
tree | 7cc7451e2c647ca3ad2d7a7f04582f524b1fd0b4 /libexec/mknetid/hash.c | |
parent | 1e599eee206937fae7e396ebae922cfb8af2c109 (diff) | |
download | src-71233f4fa43aca63e050be6bf61d37a880592c4c.tar.gz src-71233f4fa43aca63e050be6bf61d37a880592c4c.zip |
o __P removal
o use Ansi-style function definitions
Notes
Notes:
svn path=/head/; revision=90779
Diffstat (limited to 'libexec/mknetid/hash.c')
-rw-r--r-- | libexec/mknetid/hash.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/libexec/mknetid/hash.c b/libexec/mknetid/hash.c index 8de336f3d5ab..6de06d804fdb 100644 --- a/libexec/mknetid/hash.c +++ b/libexec/mknetid/hash.c @@ -51,13 +51,11 @@ static const char rcsid[] = * OZ's original sdbm hash */ u_int32_t -hash(keyarg, len) - const void *keyarg; - register size_t len; +hash(const void *keyarg, size_t len) { - register const u_char *key; - register size_t loop; - register u_int32_t h; + const u_char *key; + size_t loop; + u_int32_t h; #define HASHC h = *key++ + 65599 * h @@ -102,8 +100,7 @@ hash(keyarg, len) * We mask off all but the lower 8 bits since our table array * can only hole 256 elements. */ -u_int32_t hashkey(key) - char *key; +u_int32_t hashkey(char *key) { if (key == NULL) @@ -112,9 +109,7 @@ u_int32_t hashkey(key) } /* Find an entry in the hash table (may be hanging off a linked list). */ -struct grouplist *lookup(table, key) - struct member_entry *table[]; - char *key; +struct grouplist *lookup(struct member_entry *table[], char *key) { struct member_entry *cur; @@ -134,11 +129,7 @@ struct grouplist dummy = { 99999, NULL }; /* * Store an group member entry and/or update its grouplist. */ -void mstore (table, key, gid, dup) - struct member_entry *table[]; - char *key; - int gid; - int dup; +void mstore (struct member_entry *table[], char *key, int gid, int dup) { struct member_entry *cur, *new; struct grouplist *tmp; |