summaryrefslogtreecommitdiffstats
path: root/test/theap.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/theap.c')
-rw-r--r--test/theap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/theap.c b/test/theap.c
index 3c134bb..87c4836 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -87,15 +87,13 @@ static int tst_inc_sort(const void *_i1, const void *_i2)
static void
test_heap_init(void)
{
- time_t curr_time; /* Current time, for seeding random number generator */
size_t u; /* Local index variables */
/* Create randomized set of numbers */
- curr_time=time(NULL);
- HDsrandom((unsigned long)curr_time);
+ HDsrandom((unsigned long)HDtime(NULL));
for(u=0; u<NUM_ELEMS; u++)
/* Generate random numbers from -1000 to 1000 */
- rand_num[u].val=(HDrandom()%2001)-1001;
+ rand_num[u].val=(int)(HDrandom()%2001)-1001;
/* Sort random numbers into increasing order */
HDmemcpy(inc_sort_num,rand_num,sizeof(test_obj)*NUM_ELEMS);