hashmap: use ternary op to shorten code

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-12-18 12:04:00 +01:00
parent 7f09920585
commit 70b400d9c2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -779,7 +779,7 @@ static struct HashmapBase *hashmap_base_new(const struct hash_ops *hash_ops, enu
h->type = type;
h->from_pool = up;
h->hash_ops = hash_ops ? hash_ops : &trivial_hash_ops;
h->hash_ops = hash_ops ?: &trivial_hash_ops;
if (type == HASHMAP_TYPE_ORDERED) {
OrderedHashmap *lh = (OrderedHashmap*)h;