[svn-commits] rmudgett: branch rmudgett/ao2_enhancements r372993 - /team/rmudgett/ao2_enhan...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Sep 12 15:04:58 CDT 2012


Author: rmudgett
Date: Wed Sep 12 15:04:54 2012
New Revision: 372993

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372993
Log:
Adjust some parentheses around bit flag operations.

Modified:
    team/rmudgett/ao2_enhancements/main/astobj2.c

Modified: team/rmudgett/ao2_enhancements/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ao2_enhancements/main/astobj2.c?view=diff&rev=372993&r1=372992&r2=372993
==============================================================================
--- team/rmudgett/ao2_enhancements/main/astobj2.c (original)
+++ team/rmudgett/ao2_enhancements/main/astobj2.c Wed Sep 12 15:04:54 2012
@@ -2174,7 +2174,7 @@
 	 * If lookup by pointer or search key, run the hash and optional
 	 * sort functions.  Otherwise, traverse the whole container.
 	 */
-	if ((flags & (OBJ_POINTER | OBJ_KEY))) {
+	if (flags & (OBJ_POINTER | OBJ_KEY)) {
 		/* we know hash can handle this case */
 		bucket_cur = abs(self->hash_fn(arg, flags & (OBJ_POINTER | OBJ_KEY)));
 		bucket_cur %= self->n_buckets;
@@ -2244,7 +2244,7 @@
 			/* Was this the starting bucket? */
 			if (bucket_cur == state->bucket_start
 				&& (flags & OBJ_CONTINUE)
-				&& flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
+				&& (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY))) {
 				/* In case the bucket was empty or none of the nodes matched. */
 				state->sort_fn = NULL;
 			}
@@ -2252,7 +2252,7 @@
 			/* Was this the first container bucket? */
 			if (bucket_cur == 0
 				&& (flags & OBJ_CONTINUE)
-				&& flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
+				&& (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY))) {
 				/* Move to the end to ensure we check every bucket */
 				bucket_cur = self->n_buckets;
 				state->bucket_last = state->bucket_start + 1;
@@ -2325,7 +2325,7 @@
 			/* Was this the starting bucket? */
 			if (bucket_cur == state->bucket_start
 				&& (flags & OBJ_CONTINUE)
-				&& flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
+				&& (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY))) {
 				/* In case the bucket was empty or none of the nodes matched. */
 				state->sort_fn = NULL;
 			}
@@ -2333,7 +2333,7 @@
 			/* Was this the last container bucket? */
 			if (bucket_cur == self->n_buckets - 1
 				&& (flags & OBJ_CONTINUE)
-				&& flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
+				&& (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY))) {
 				/* Move to the beginning to ensure we check every bucket */
 				bucket_cur = -1;
 				state->bucket_last = state->bucket_start;
@@ -2438,7 +2438,7 @@
 			/* Was this the first container bucket? */
 			if (bucket_cur == 0
 				&& (flags & OBJ_CONTINUE)
-				&& flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
+				&& (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY))) {
 				/* Move to the end to ensure we check every bucket */
 				bucket_cur = self->n_buckets;
 				state->bucket_last = state->bucket_start + 1;
@@ -2505,7 +2505,7 @@
 			/* Was this the last container bucket? */
 			if (bucket_cur == self->n_buckets - 1
 				&& (flags & OBJ_CONTINUE)
-				&& flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
+				&& (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY))) {
 				/* Move to the beginning to ensure we check every bucket */
 				bucket_cur = -1;
 				state->bucket_last = state->bucket_start;




More information about the svn-commits mailing list