summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-01-05 21:01:51 +0000
committerArnaud Fontaine <arnau@debian.org>2012-05-22 17:20:31 +0900
commitf7921a5f1b4524300f297c41200623d7b7fbf17a (patch)
tree67de77d2e2fc8cbac03beae17219fc5e4b0d6393
parent98ca67376f87854b1b9308ac948d16a890e5088b (diff)
downloadutil-image-f7921a5f1b4524300f297c41200623d7b7fbf17a.tar.gz
Use rand() instead of random(), being part of the C standard library,
it is more portable (for example, to MinGW) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Arnaud Fontaine <arnau@debian.org>
-rw-r--r--image/test_formats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/image/test_formats.c b/image/test_formats.c
index b03673b..185492a 100644
--- a/image/test_formats.c
+++ b/image/test_formats.c
@@ -43,7 +43,7 @@ color (uint32_t depth, uint32_t x, uint32_t y)
uint32_t p;
if (depth == 1) {
- int frac = random() % (WIDTH * HEIGHT);
+ int frac = rand() % (WIDTH * HEIGHT);
p = x * y >= frac;
return p;
}