[asterisk-commits] mmichelson: branch mmichelson/acl-v6 r276488 - /team/mmichelson/acl-v6/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 14 15:40:50 CDT 2010


Author: mmichelson
Date: Wed Jul 14 15:40:38 2010
New Revision: 276488

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276488
Log:
Remove unnecessary casts.


Modified:
    team/mmichelson/acl-v6/main/acl.c

Modified: team/mmichelson/acl-v6/main/acl.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/acl-v6/main/acl.c?view=diff&rev=276488&r1=276487&r2=276488
==============================================================================
--- team/mmichelson/acl-v6/main/acl.c (original)
+++ team/mmichelson/acl-v6/main/acl.c Wed Jul 14 15:40:38 2010
@@ -360,7 +360,7 @@
 
 	result6.sin6_family = AF_INET6;
 	for (i = 0; i < 4; ++i) {
-		V6_WORD(&result6, i) = (uint32_t)(V6_WORD(addr6, i) & V6_WORD(mask6, i));
+		V6_WORD(&result6, i) = V6_WORD(addr6, i) & V6_WORD(mask6, i);
 	}
 	memcpy(&result->ss, &result6, sizeof(result6));
 	result->len = sizeof(result6);
@@ -402,7 +402,7 @@
 			/* Special case to deal with unpredictable behavior
 			 * when attempting to shift more than 31 bits
 			 */
-			V6_WORD(&sin6, 3) = (uint32_t)htonl(0x00000000);
+			V6_WORD(&sin6, 3) = htonl(0x00000000);
 		} else {
 			V6_WORD(&sin6, 3) = htonl(0xFFFFFFFF << (32 - mask));
 		}
@@ -418,7 +418,7 @@
 				/* Mask is 0. Special case to deal with unpredictable
 				 * behavior when trying to shift more than 31 bits
 				 */
-				V6_WORD(&sin6, i) = (uint32_t)htonl(0x00000000);
+				V6_WORD(&sin6, i) = htonl(0x00000000);
 			}
 		}
 	}




More information about the asterisk-commits mailing list