aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-10 13:18:39 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-10 13:18:39 +0000
commit2bc1a1435b7d98d68708f264720c016de2e3cba4 (patch)
treed523fdecaf8c8b460f0eeaab7adac421d5325c8b /tests
parent309f58262550a3219fac3fd94eb495226bbcdb80 (diff)
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. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@269714 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'tests')
-rw-r--r--tests/test_heap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_heap.c b/tests/test_heap.c
index 12320c62a..3ba9abb48 100644
--- a/tests/test_heap.c
+++ b/tests/test_heap.c
@@ -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;