Replace call to random() with the more portable rand() since we
authorJ. Ali Harlow <ali@juiblex.co.uk>
Thu, 8 Jan 2009 17:36:50 +0000 (17:36 +0000)
committerJ. Ali Harlow <ali@juiblex.co.uk>
Thu, 8 Jan 2009 17:36:50 +0000 (17:36 +0000)
don't have any need for a "good" random number generator.

librazor/util.c

index 401f990..9618f50 100644 (file)
@@ -194,7 +194,7 @@ __qsort_with_data(void *base, size_t nelem, uint32_t *map,
        mp = map;
        mstart = map;
        mend = map + nelem;
-       pivot = base + (random() % nelem) * size;
+       pivot = base + (rand() % nelem) * size;
 
        while (p < end) {
                result = ctx->compare(p, pivot, ctx->data);