summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-01-04 08:14:36 +0000
committerBrian Paul <[email protected]>2000-01-04 08:14:36 +0000
commit90d9e02f3ac9bda1650caaf37fe5f0e3f4ce01cf (patch)
treedc235cb08c15703456d8f3a4a9ce07eced166f62 /src/mesa/main
parent2d2e9c0c0aa2db30e9fc567ea76b80ab5721289a (diff)
start search at 1 in HashFindFreeKeyBlock()
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/hash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c
index c25190335d3..20f81962bf0 100644
--- a/src/mesa/main/hash.c
+++ b/src/mesa/main/hash.c
@@ -1,4 +1,4 @@
-/* $Id: hash.c,v 1.4 1999/11/11 01:22:26 brianp Exp $ */
+/* $Id: hash.c,v 1.5 2000/01/04 08:14:36 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -229,7 +229,7 @@ void HashPrint(const struct HashTable *table)
* Find a block of 'numKeys' adjacent unused hash keys.
* Input: table - the hash table
* numKeys - number of keys needed
- * Return: startint key of free block or 0 if failure
+ * Return: starting key of free block or 0 if failure
*/
GLuint HashFindFreeKeyBlock(const struct HashTable *table, GLuint numKeys)
{
@@ -241,9 +241,9 @@ GLuint HashFindFreeKeyBlock(const struct HashTable *table, GLuint numKeys)
else {
/* the slow solution */
GLuint freeCount = 0;
- GLuint freeStart = 0;
+ GLuint freeStart = 1;
GLuint key;
- for (key=0; key!=maxKey; key++) {
+ for (key=1; key!=maxKey; key++) {
if (HashLookup(table, key)) {
/* darn, this key is already in use */
freeCount = 0;