Make it so you don't have to cast away const in a couple places
authorRussell Bryant <russell@russellbryant.com>
Tue, 4 Mar 2008 04:47:32 +0000 (04:47 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 4 Mar 2008 04:47:32 +0000 (04:47 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105594 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/hashtab.c

index 111fecc..7ab1204 100644 (file)
@@ -165,7 +165,7 @@ unsigned int ast_hashtab_hash_string(const void *obj)
 
 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_sax(const void *obj) /* from Josh */
 
 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++) {