From: Russell Bryant Date: Tue, 4 Mar 2008 04:47:32 +0000 (+0000) Subject: Make it so you don't have to cast away const in a couple places X-Git-Tag: 1.6.0-beta7~236 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7205c1f23cc11952eaad4ebefecf459c08834b3c;p=thirdparty%2Fasterisk.git Make it so you don't have to cast away const in a couple places git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105594 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/hashtab.c b/main/hashtab.c index 111fecc01f..7ab1204865 100644 --- a/main/hashtab.c +++ b/main/hashtab.c @@ -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++) {