ossp-pkg/uuid/uuid_prng.c 1.18 -> 1.19
--- uuid_prng.c 2008/02/21 15:34:51 1.18
+++ uuid_prng.c 2008/03/06 12:14:49 1.19
@@ -87,7 +87,7 @@
(*prng)->cnt = 0;
/* seed the C library PRNG once */
- (void)time_gettimeofday(&tv, NULL);
+ (void)time_gettimeofday(&tv);
pid = getpid();
srand((unsigned int)(
((unsigned int)pid << 16)
@@ -142,9 +142,9 @@
/* approach 2: try to gather data via weaker libc PRNG API. */
while (n > 0) {
/* gather new entropy */
- (void)time_gettimeofday(&(entropy.tv), NULL); /* source: libc time */
- entropy.rnd = rand(); /* source: libc PRNG */
- entropy.cnt = prng->cnt++; /* source: local counter */
+ (void)time_gettimeofday(&(entropy.tv)); /* source: libc time */
+ entropy.rnd = rand(); /* source: libc PRNG */
+ entropy.cnt = prng->cnt++; /* source: local counter */
/* pass entropy into MD5 engine */
if (md5_update(prng->md5, (void *)&entropy, sizeof(entropy)) != MD5_RC_OK)
|
|