[svn-commits] russell: trunk r105594 - /trunk/main/hashtab.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 3 22:47:33 CST 2008


Author: russell
Date: Mon Mar  3 22:47:32 2008
New Revision: 105594

URL: http://svn.digium.com/view/asterisk?view=rev&rev=105594
Log:
Make it so you don't have to cast away const in a couple places

Modified:
    trunk/main/hashtab.c

Modified: trunk/main/hashtab.c
URL: http://svn.digium.com/view/asterisk/trunk/main/hashtab.c?view=diff&rev=105594&r1=105593&r2=105594
==============================================================================
--- trunk/main/hashtab.c (original)
+++ trunk/main/hashtab.c Mon Mar  3 22:47:32 2008
@@ -165,7 +165,7 @@
 
 unsigned int ast_hashtab_hash_string_sax(const void *obj) /* from Josh */
 {
-	unsigned char *str = (unsigned char *) obj;
+	const unsigned char *str = obj;
 	unsigned int total = 0, c = 0;
 
 	while ((c = *str++))
@@ -176,7 +176,7 @@
 
 unsigned int ast_hashtab_hash_string_nocase(const void *obj)
 {
-	unsigned char *str = (unsigned char*)obj;
+	const unsigned char *str = obj;
 	unsigned int total;
 
 	for (total = 0; *str; str++) {




More information about the svn-commits mailing list