From: Russell Bryant Date: Thu, 10 Jun 2010 13:18:39 +0000 (+0000) Subject: Merged revisions 269711 via svnmerge from X-Git-Tag: 1.6.2.10-rc1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53afcabd4f70addfba2fa751867c9d777059e3b7;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@269714 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/tests/test_heap.c b/tests/test_heap.c index 12320c62a8..3ba9abb486 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;