projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c85820
)
[libprio] random prio was still printing instead of returning value
author
Christophe Varoqui
<christophe.varoqui@free.fr>
Tue, 8 Jan 2008 22:37:47 +0000
(23:37 +0100)
committer
Christophe Varoqui
<christophe.varoqui@free.fr>
Tue, 8 Jan 2008 22:37:47 +0000
(23:37 +0100)
fix
libprio/random.c
patch
|
blob
|
history
diff --git
a/libprio/random.c
b/libprio/random.c
index
0ad9e26
..
68441c1
100644
(file)
--- a/
libprio/random.c
+++ b/
libprio/random.c
@@
-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));
}