OSDN Git Service

xf86drmHash: remove redundant zero init
authorRob Clark <robclark@freedesktop.org>
Thu, 11 Oct 2018 23:18:10 +0000 (19:18 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 13 Oct 2018 19:39:01 +0000 (15:39 -0400)
drmMalloc() is already calloc()

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
xf86drmHash.c

index 467498c..891b732 100644 (file)
@@ -110,12 +110,7 @@ drm_public void *drmHashCreate(void)
     table           = drmMalloc(sizeof(*table));
     if (!table) return NULL;
     table->magic    = HASH_MAGIC;
-    table->entries  = 0;
-    table->hits     = 0;
-    table->partials = 0;
-    table->misses   = 0;
 
-    for (i = 0; i < HASH_SIZE; i++) table->buckets[i] = NULL;
     return table;
 }