summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/hash.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-05-10 19:24:40 +0000
committerBenny Prijono <bennylp@teluu.com>2006-05-10 19:24:40 +0000
commit50a501dbe89ec8f9a76540015890dd361f1ec8a1 (patch)
treea45dac4292320647ed297b35239fccf38eb5885b /pjlib/src/pj/hash.c
parent5f10c756ac9d5f48efe2adbcccf5d54634540d61 (diff)
Merge-in RTEMS port patch by Phil Torre <ptorre@zetron.com>, alpha release.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@433 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/hash.c')
-rw-r--r--pjlib/src/pj/hash.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pjlib/src/pj/hash.c b/pjlib/src/pj/hash.c
index 0495fadc..1f86317b 100644
--- a/pjlib/src/pj/hash.c
+++ b/pjlib/src/pj/hash.c
@@ -49,20 +49,21 @@ struct pj_hash_table_t
-PJ_DEF(pj_uint32_t) pj_hash_calc(pj_uint32_t hash, const void *key, unsigned keylen)
+PJ_DEF(pj_uint32_t) pj_hash_calc(pj_uint32_t hash, const void *key,
+ unsigned keylen)
{
PJ_CHECK_STACK();
if (keylen==PJ_HASH_KEY_STRING) {
const unsigned char *p = key;
for ( ; *p; ++p ) {
- hash = hash * PJ_HASH_MULTIPLIER + *p;
+ hash = (hash * PJ_HASH_MULTIPLIER) + *p;
}
} else {
const unsigned char *p = key,
*end = p + keylen;
for ( ; p!=end; ++p) {
- hash = hash * PJ_HASH_MULTIPLIER + *p;
+ hash = (hash * PJ_HASH_MULTIPLIER) + *p;
}
}
return hash;