Replace random() and related calls with generate_random_buffer()
[ambi/samba-autobuild/.git] / dfs_server / dfs_server_ad.c
index 3d93e19c9898fb53dca8be5db66b9982289b1cad..61466329eafd66cdb8235cf5b0319d793c0bfe35 100644 (file)
@@ -42,13 +42,11 @@ static void shuffle_dc_set(struct dc_set *list)
 {
        uint32_t i;
 
-       srandom(time(NULL));
-
        for (i = list->count; i > 1; i--) {
                uint32_t r;
                const char *tmp;
 
-               r = random() % i;
+               r = generate_random() % i;
 
                tmp = list->names[i - 1];
                list->names[i - 1] = list->names[r];