summaryrefslogtreecommitdiffstats
path: root/libexec/revnetgroup/hash.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-05-12 17:17:45 +0000
committerwpaul <wpaul@FreeBSD.org>1996-05-12 17:17:45 +0000
commit716641bdae47d54927443ba5501780528d499c88 (patch)
tree1d34470d678d2b8ecf2ba42ddbdf82e311e56d50 /libexec/revnetgroup/hash.c
parent69278b0c5dc7ccde95c4e6d05783bf61464c8942 (diff)
downloadFreeBSD-src-716641bdae47d54927443ba5501780528d499c88.zip
FreeBSD-src-716641bdae47d54927443ba5501780528d499c88.tar.gz
Small touchups:
- Fix typos in comments in hash.c. - Remove unneeded and unused member from grouplist struct in hash.h. (Curiously, the compiler never complained about this even though the member was of type 'struct grps' which is not defined anywhere in this program.) - char ch -> int ch in revnetgroup.c. - char *argv[0]; -> char *argv[]; also in revnetgroup.c. - Force the user to specify at least one of the -u or -h flags and complain if they specify both.
Diffstat (limited to 'libexec/revnetgroup/hash.c')
-rw-r--r--libexec/revnetgroup/hash.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libexec/revnetgroup/hash.c b/libexec/revnetgroup/hash.c
index b875843..1469fcf 100644
--- a/libexec/revnetgroup/hash.c
+++ b/libexec/revnetgroup/hash.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: hash.c,v 1.1.1.1 1995/10/26 16:25:29 wpaul Exp $
*/
#include <stdio.h>
@@ -38,6 +38,10 @@
#include <sys/types.h>
#include "hash.h"
+#ifndef lint
+static const char rcsid[] = "$Id$";
+#endif
+
/*
* This hash function is stolen directly from the
* Berkeley DB package. It already exists inside libc, but
@@ -97,7 +101,7 @@ hash(keyarg, len)
/*
* Generate a hash value for a given key (character string).
* We mask off all but the lower 8 bits since our table array
- * can only hole 256 elements.
+ * can only hold 256 elements.
*/
u_int32_t hashkey(key)
char *key;
@@ -136,7 +140,7 @@ char *lookup(table, key)
*
* One way to deal with this is to malloc(2) a second table and start
* doing indirection, but this is a pain in the butt and it's not worth
- * going to all that trouble for a dinky littke program like this. Instead,
+ * going to all that trouble for a dinky little program like this. Instead,
* we turn each table entry into a linked list and simply link keys
* with the same hash value together at the same index location within
* the table.
@@ -162,7 +166,7 @@ void store (table, key, data)
}
/*
- * Store an group member entry and/or update its grouplist. This is
+ * Store a group member entry and/or update its grouplist. This is
* a bit more complicated than the previous function since we have to
* maintain not only the hash table of group members, each group member
* structure also has a linked list of groups hung off it. If handed
OpenPOWER on IntegriCloud