diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-02 17:00:52 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-02 17:00:52 +0000 |
commit | 2c174e162eb22641834f0e9b664b426a4eecbc2c (patch) | |
tree | d1a204ee2221106fc25db11b5c362af1e7ff6318 /main/astobj2.c | |
parent | 2a91defe983efef62782e2d235a1c7ba08d8c5e4 (diff) |
Merged revisions 221971 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r221971 | tilghman | 2009-10-02 11:59:57 -0500 (Fri, 02 Oct 2009) | 9 lines
Merged revisions 221970 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r221970 | tilghman | 2009-10-02 11:58:03 -0500 (Fri, 02 Oct 2009) | 2 lines
Ensure the result of the hash function is positive. Negative array offsets suck.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@221972 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/astobj2.c')
-rw-r--r-- | main/astobj2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/astobj2.c b/main/astobj2.c index f67e18868..4603b73ac 100644 --- a/main/astobj2.c +++ b/main/astobj2.c @@ -395,7 +395,7 @@ void *ao2_link(struct ao2_container *c, void *user_data) if (!p) return NULL; - i = c->hash_fn(user_data, OBJ_POINTER); + i = abs(c->hash_fn(user_data, OBJ_POINTER)); ao2_lock(c); i %= c->n_buckets; |