[svn-commits] tilghman: branch 1.6.1 r221973 - in /branches/1.6.1: ./ funcs/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Oct 2 12:01:46 CDT 2009


Author: tilghman
Date: Fri Oct  2 12:01:42 2009
New Revision: 221973

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=221973
Log:
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.
  ........
................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/funcs/func_lock.c
    branches/1.6.1/main/astobj2.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/funcs/func_lock.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/funcs/func_lock.c?view=diff&rev=221973&r1=221972&r2=221973
==============================================================================
--- branches/1.6.1/funcs/func_lock.c (original)
+++ branches/1.6.1/funcs/func_lock.c Fri Oct  2 12:01:42 2009
@@ -153,7 +153,7 @@
 
 static int null_hash_cb(const void *obj, const int flags)
 {
-	return abs((int)(long) obj);
+	return (int)(long) obj;
 }
 
 static int null_cmp_cb(void *obj, void *arg, int flags)

Modified: branches/1.6.1/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/main/astobj2.c?view=diff&rev=221973&r1=221972&r2=221973
==============================================================================
--- branches/1.6.1/main/astobj2.c (original)
+++ branches/1.6.1/main/astobj2.c Fri Oct  2 12:01:42 2009
@@ -503,7 +503,7 @@
 	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;




More information about the svn-commits mailing list