summaryrefslogtreecommitdiffstats
path: root/libexec/revnetgroup/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/revnetgroup/hash.c')
-rw-r--r--libexec/revnetgroup/hash.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/libexec/revnetgroup/hash.c b/libexec/revnetgroup/hash.c
index c11244a..1180080 100644
--- a/libexec/revnetgroup/hash.c
+++ b/libexec/revnetgroup/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,8 @@ hash(keyarg, len)
* We mask off all but the lower 8 bits since our table array
* can only hold 256 elements.
*/
-u_int32_t hashkey(key)
- char *key;
+u_int32_t
+hashkey(char *key)
{
if (key == NULL)
@@ -112,9 +110,8 @@ u_int32_t hashkey(key)
}
/* Find an entry in the hash table (may be hanging off a linked list). */
-char *lookup(table, key)
- struct group_entry *table[];
- char *key;
+char *
+lookup(struct group_entry *table[], char *key)
{
struct group_entry *cur;
@@ -146,9 +143,8 @@ char *lookup(table, key)
*
* That's a lot of comment for such a small piece of code, isn't it.
*/
-void store (table, key, data)
- struct group_entry *table[];
- char *key, *data;
+void
+store(struct group_entry *table[], char *key, char *data)
{
struct group_entry *new;
u_int32_t i;
@@ -176,9 +172,8 @@ void store (table, key, data)
* an entry in the table, then we just have to do one thing, which is
* to update its grouplist.
*/
-void mstore (table, key, data, domain)
- struct member_entry *table[];
- char *key, *data, *domain;
+void
+mstore(struct member_entry *table[], char *key, char *data, char *domain)
{
struct member_entry *cur, *new;
struct grouplist *tmp;
OpenPOWER on IntegriCloud