mesa/main: fix inverted condition
[mesa.git] / src / mesa / main / hash.c
index d0e575ea6b3b8896ac38047bd9d40aa1eecf0c9a..99249c4be18b4c6024018aef7bcb73bc243aa9fd 100644 (file)
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include "errors.h"
 #include "glheader.h"
 #include "hash.h"
 #include "util/hash_table.h"
+#include "util/u_memory.h"
 
 
 /**
@@ -282,8 +284,6 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table,
                     void (*callback)(GLuint key, void *data, void *userData),
                     void *userData)
 {
-   struct hash_entry *entry;
-
    assert(callback);
    _mesa_HashLockMutex(table);
    table->InDeleteAll = GL_TRUE;
@@ -315,7 +315,6 @@ hash_walk_unlocked(const struct _mesa_HashTable *table,
    assert(table);
    assert(callback);
 
-   struct hash_entry *entry;
    hash_table_foreach(table->ht, entry) {
       callback((uintptr_t)entry->key, entry->data, userData);
    }