diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-02-02 19:11:25 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-02-02 19:11:25 +0300 |
| commit | 1ac88792c0cb306bdb05f977f88f449fe7a1a1ea (patch) | |
| tree | c84b03a39dcb1ad4ba525fc271d71354fd2ea931 /lib/hash.c | |
| parent | cc73a06499cc31b29e96e6b04ab6e7b181f09e28 (diff) | |
*: fix all backets
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/hash.c')
| -rw-r--r-- | lib/hash.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hash.c b/lib/hash.c index ed429b77d0..ec616ee724 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -32,7 +32,7 @@ #include "libfrr_trace.h" DEFINE_MTYPE_STATIC(LIB, HASH, "Hash") -DEFINE_MTYPE_STATIC(LIB, HASH_BACKET, "Hash Bucket") +DEFINE_MTYPE_STATIC(LIB, HASH_BUCKET, "Hash Bucket") DEFINE_MTYPE_STATIC(LIB, HASH_INDEX, "Hash Index") static pthread_mutex_t _hashes_mtx = PTHREAD_MUTEX_INITIALIZER; @@ -168,7 +168,7 @@ void *hash_get(struct hash *hash, void *data, void *(*alloc_func)(void *)) index = key & (hash->size - 1); } - bucket = XCALLOC(MTYPE_HASH_BACKET, sizeof(struct hash_bucket)); + bucket = XCALLOC(MTYPE_HASH_BUCKET, sizeof(struct hash_bucket)); bucket->data = newdata; bucket->key = key; bucket->next = hash->index[index]; @@ -239,7 +239,7 @@ void *hash_release(struct hash *hash, void *data) hash_update_ssq(hash, oldlen, newlen); ret = bucket->data; - XFREE(MTYPE_HASH_BACKET, bucket); + XFREE(MTYPE_HASH_BUCKET, bucket); hash->count--; break; } @@ -302,7 +302,7 @@ void hash_clean(struct hash *hash, void (*free_func)(void *)) if (free_func) (*free_func)(hb->data); - XFREE(MTYPE_HASH_BACKET, hb); + XFREE(MTYPE_HASH_BUCKET, hb); hash->count--; } hash->index[i] = NULL; |
