From 14ac763ab3c2c315abfe7ce73aa2bfce3b761887 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Wed, 30 Sep 2015 17:27:23 -0500 Subject: [PATCH] res_sorcery_memory_cache.c: Made use OBJ_SEARCH_MASK. Change-Id: Ibca6574dc3c213b29cc93486e01ccd51f5caa46c --- res/res_sorcery_memory_cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/res_sorcery_memory_cache.c b/res/res_sorcery_memory_cache.c index f0fc055376..9caf1f88b8 100644 --- a/res/res_sorcery_memory_cache.c +++ b/res/res_sorcery_memory_cache.c @@ -241,7 +241,7 @@ static int sorcery_memory_cache_hash(const void *obj, int flags) const char *name = obj; int hash; - switch (flags & (OBJ_SEARCH_OBJECT | OBJ_SEARCH_KEY | OBJ_SEARCH_PARTIAL_KEY)) { + switch (flags & OBJ_SEARCH_MASK) { default: case OBJ_SEARCH_OBJECT: name = cache->name; @@ -276,7 +276,7 @@ static int sorcery_memory_cache_cmp(void *obj, void *arg, int flags) const char *right_name = arg; int cmp; - switch (flags & (OBJ_SEARCH_OBJECT | OBJ_SEARCH_KEY | OBJ_SEARCH_PARTIAL_KEY)) { + switch (flags & OBJ_SEARCH_MASK) { default: case OBJ_SEARCH_OBJECT: right_name = right->name; @@ -306,7 +306,7 @@ static int sorcery_memory_cached_object_hash(const void *obj, int flags) const char *name = obj; int hash; - switch (flags & (OBJ_SEARCH_OBJECT | OBJ_SEARCH_KEY | OBJ_SEARCH_PARTIAL_KEY)) { + switch (flags & OBJ_SEARCH_MASK) { default: case OBJ_SEARCH_OBJECT: name = ast_sorcery_object_get_id(cached->object); @@ -341,7 +341,7 @@ static int sorcery_memory_cached_object_cmp(void *obj, void *arg, int flags) const char *right_name = arg; int cmp; - switch (flags & (OBJ_SEARCH_OBJECT | OBJ_SEARCH_KEY | OBJ_SEARCH_PARTIAL_KEY)) { + switch (flags & OBJ_SEARCH_MASK) { default: case OBJ_SEARCH_OBJECT: right_name = ast_sorcery_object_get_id(right->object); -- 2.47.2