[Asterisk-code-review] res sorcery memory cache.c: Made use OBJ SEARCH MASK. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Fri Oct 2 16:27:46 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: res_sorcery_memory_cache.c: Made use OBJ_SEARCH_MASK.
......................................................................


res_sorcery_memory_cache.c: Made use OBJ_SEARCH_MASK.

Change-Id: Ibca6574dc3c213b29cc93486e01ccd51f5caa46c
---
M res/res_sorcery_memory_cache.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/res/res_sorcery_memory_cache.c b/res/res_sorcery_memory_cache.c
index e486a64..a51e8df 100644
--- a/res/res_sorcery_memory_cache.c
+++ b/res/res_sorcery_memory_cache.c
@@ -243,7 +243,7 @@
 	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;
@@ -278,7 +278,7 @@
 	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;
@@ -308,7 +308,7 @@
 	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);
@@ -343,7 +343,7 @@
 	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);

-- 
To view, visit https://gerrit.asterisk.org/1356
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibca6574dc3c213b29cc93486e01ccd51f5caa46c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list