[libprio] random prio was still printing instead of returning value
authorChristophe Varoqui <christophe.varoqui@free.fr>
Tue, 8 Jan 2008 22:37:47 +0000 (23:37 +0100)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Tue, 8 Jan 2008 22:37:47 +0000 (23:37 +0100)
fix

libprio/random.c

index 0ad9e26..68441c1 100644 (file)
@@ -11,6 +11,5 @@ int prio_random(struct path * pp)
        
        gettimeofday(&tv, NULL);
        srand((unsigned int)tv.tv_usec);
-       printf("%i\n", 1+(int) (10.0*rand()/(RAND_MAX+1.0)));
-       return 0;
+       return 1+(int) (10.0*rand()/(RAND_MAX+1.0));
 }