aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov2015-03-26 16:19:26 -0500
committerEmil Velikov2015-04-05 09:33:33 -0500
commit03cd9dffef353924058b1b91086fedfbe44ffcd0 (patch)
tree4ac7e96e790659c7ce97ca3dc9469cf680997121 /xf86drmHash.c
parent1ed5faab24da62d970aa34ec242fa2d95896e5fb (diff)
downloadexternal-libdrm-03cd9dffef353924058b1b91086fedfbe44ffcd0.tar.gz
external-libdrm-03cd9dffef353924058b1b91086fedfbe44ffcd0.tar.xz
external-libdrm-03cd9dffef353924058b1b91086fedfbe44ffcd0.zip
drm: replace HASH_DEBUG with DEBUG
... and remove the useless SL_DEBUG and RANDOM_DEBUG v2: Rebase on earlier changes. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Diffstat (limited to 'xf86drmHash.c')
-rw-r--r--xf86drmHash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xf86drmHash.c b/xf86drmHash.c
index f7d7f73b..199a2a3f 100644
--- a/xf86drmHash.c
+++ b/xf86drmHash.c
@@ -75,7 +75,6 @@
75#include "xf86drmHash.h" 75#include "xf86drmHash.h"
76 76
77#define HASH_MAGIC 0xdeadbeef 77#define HASH_MAGIC 0xdeadbeef
78#define HASH_DEBUG 0
79 78
80static unsigned long HashHash(unsigned long key) 79static unsigned long HashHash(unsigned long key)
81{ 80{
@@ -99,7 +98,7 @@ static unsigned long HashHash(unsigned long key)
99 } 98 }
100 99
101 hash %= HASH_SIZE; 100 hash %= HASH_SIZE;
102#if HASH_DEBUG 101#if DEBUG
103 printf( "Hash(%d) = %d\n", key, hash); 102 printf( "Hash(%d) = %d\n", key, hash);
104#endif 103#endif
105 return hash; 104 return hash;
@@ -202,7 +201,7 @@ int drmHashInsert(void *t, unsigned long key, void *value)
202 bucket->value = value; 201 bucket->value = value;
203 bucket->next = table->buckets[hash]; 202 bucket->next = table->buckets[hash];
204 table->buckets[hash] = bucket; 203 table->buckets[hash] = bucket;
205#if HASH_DEBUG 204#if DEBUG
206 printf("Inserted %d at %d/%p\n", key, hash, bucket); 205 printf("Inserted %d at %d/%p\n", key, hash, bucket);
207#endif 206#endif
208 return 0; /* Added to table */ 207 return 0; /* Added to table */