[Xcb] [PATCH xcb-util-image 2/2] Use rand() instead of random()

Jon TURNEY jon.turney at dronecode.org.uk
Thu Jan 5 13:01:51 PST 2012


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 at dronecode.org.uk>
---
 image/test_formats.c |    2 +-
 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;
 	}
-- 
1.7.5.1



More information about the Xcb mailing list