On 09/ 4/13 12:40 AM, Matthieu Herrb wrote:
@@ -58,6 +62,9 @@ IceGenerateMagicCookie (
if ((auth = malloc (len + 1)) == NULL)
return (NULL);
+#ifdef HAVE_ARC4RANDOM_BUF
+ arc4random_buf(auth, len);
+#else
#ifdef ITIMER_REAL
{
struct timeval now;
@@ -79,8 +86,8 @@ IceGenerateMagicCookie (
value = rand ();
auth[i] = value & 0xff;
}
+#endif
auth[len] = '\0';
-
return (auth);
}
Won't that cause unused variable warnings for ldata, seed, value, & i,
which are now only used in the #else clause? Can you wrap their
variable declarations in #ifndef HAVE_ARC4RANDOM_BUF?
--
-Alan Coopersmith- [email protected]
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel