diff --git a/Tools/fonctions.c b/Tools/fonctions.c index c9d2b53..b3d38d6 100644 --- a/Tools/fonctions.c +++ b/Tools/fonctions.c @@ -450,13 +450,9 @@ int set_new_seed(int k) char *ptr; long seed; -#if DEBUG_MESSAGE -if (k) fprintf(stderr, "%s: k %d\n", __func__, k); -#endif - if (NULL==(ptr=getenv("FIXED_SEED"))) { /* no fixed seed in context, doing semi-random */ - srand(getpid()); + srand(getpid() + k); #if DEBUG_LEVEL fprintf(stderr, "no FIXED_SEED, first rand is number : %d\n", rand()); #endif @@ -464,10 +460,6 @@ if (NULL==(ptr=getenv("FIXED_SEED"))) { else { /* try to parse the env var */ seed = strtol(ptr, NULL, 0); -#if DEBUG_LEVEL - fprintf(stderr, "%s : strtol(%s) -> %ld\n", - __func__, ptr, seed); -#endif srand(seed); }