gallium/cso_hash: remove always constant variable nodeSize

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
This commit is contained in:
Marek Olšák 2020-01-21 20:18:54 -05:00
parent a8bbf10540
commit 789ed29d59
2 changed files with 1 additions and 3 deletions

View file

@ -75,7 +75,7 @@ static int countBits(int hint)
static void *cso_data_allocate_node(struct cso_hash_data *hash)
{
return MALLOC(hash->nodeSize);
return MALLOC(sizeof(struct cso_node));
}
static void cso_free_node(struct cso_node *node)
@ -208,7 +208,6 @@ bool cso_hash_init(struct cso_hash *hash)
hash->data.d->fakeNext = 0;
hash->data.d->buckets = 0;
hash->data.d->size = 0;
hash->data.d->nodeSize = sizeof(struct cso_node);
hash->data.d->userNumBits = (short)MinNumBits;
hash->data.d->numBits = 0;
hash->data.d->numBuckets = 0;

View file

@ -73,7 +73,6 @@ struct cso_hash_data {
struct cso_node *fakeNext;
struct cso_node **buckets;
int size;
int nodeSize;
short userNumBits;
short numBits;
int numBuckets;