diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-10 13:18:39 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-10 13:18:39 +0000 |
commit | 2bc1a1435b7d98d68708f264720c016de2e3cba4 (patch) | |
tree | d523fdecaf8c8b460f0eeaab7adac421d5325c8b | |
parent | 309f58262550a3219fac3fd94eb495226bbcdb80 (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
-rw-r--r-- | tests/test_heap.c | 2 |
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; |