[asterisk-commits] russell: branch 1.6.2 r269714 - in /branches/1.6.2: ./ tests/test_heap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 10 08:18:42 CDT 2010


Author: russell
Date: Thu Jun 10 08:18:39 2010
New Revision: 269714

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=269714
Log:
Merged revisions 269711 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r269711 | russell | 2010-06-10 08:17:51 -0500 (Thu, 10 Jun 2010) | 2 lines
  
  Fix an off by one error that caused a unit test to occasionally crash.
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/tests/test_heap.c

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

Modified: branches/1.6.2/tests/test_heap.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/tests/test_heap.c?view=diff&rev=269714&r1=269713&r2=269714
==============================================================================
--- branches/1.6.2/tests/test_heap.c (original)
+++ branches/1.6.2/tests/test_heap.c Thu Jun 10 08:18:39 2010
@@ -209,7 +209,7 @@
 
 	i = test_size / 10;
 	while (i--) {
-		random_index = ast_random() % test_size - 1;
+		random_index = ast_random() % test_size;
 		node = ast_heap_remove(h, &nodes[random_index]);
 		if (nodes[random_index].val != node->val){
 			res = -4;




More information about the asterisk-commits mailing list