From 75d97ca45b74eccc01b18f44040f946d9d5df9f5 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 28 Sep 2009 11:50:51 +0300 Subject: ubinize/ubiformat: improve random number seeding Add current time to the PID to improve the pseudo-random number generator seeding. Also, use 'rand()' instead of 'random()', because 'srand()' is for 'rand()'. Signed-off-by: Artem Bityutskiy --- ubi-utils/src/common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ubi-utils/src/common.h') diff --git a/ubi-utils/src/common.h b/ubi-utils/src/common.h index 955c50f..d14cb48 100644 --- a/ubi-utils/src/common.h +++ b/ubi-utils/src/common.h @@ -78,6 +78,7 @@ static inline int is_power_of_2(unsigned long long n) long long ubiutils_get_bytes(const char *str); void ubiutils_print_bytes(long long bytes, int bracket); void ubiutils_print_text(FILE *stream, const char *txt, int len); +int ubiutils_srand(void); #ifdef __cplusplus } -- cgit v1.2.3