]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 269711 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 10 Jun 2010 13:18:39 +0000 (13:18 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 10 Jun 2010 13:18:39 +0000 (13:18 +0000)
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.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@269714 65c4cc65-6c06-0410-ace0-fbb531ad65f3

tests/test_heap.c

index 12320c62a864798017de293b3cb49a7fc1ac4e30..3ba9abb4860f5a798553426c4ab891a7c73e9ad9 100644 (file)
@@ -209,7 +209,7 @@ static int test3(int fd)
 
        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;