ache ba8920d51c 1) POSIX prohibits printing errors to stderr here and require
returning NULL:

"Upon successful completion, initstate() and setstate() shall return a
pointer to the previous state array; otherwise, a null pointer shall
be returned.

Although some implementations of random() have written messages to
standard error, such implementations do not conform to POSIX.1-2008."

2) Move error detections earlier to prevent state modifying.

MFC after:      1 week
2016-05-22 06:18:59 +00:00
..
2016-05-13 04:03:20 +00:00
2015-09-20 20:15:44 +00:00
2013-12-13 21:50:03 +00:00
2014-07-08 12:19:34 +00:00
2014-01-14 01:52:34 +00:00
2016-04-30 01:24:24 +00:00
2015-09-20 20:15:44 +00:00
2016-04-18 09:56:41 +00:00
2015-09-14 18:44:13 +00:00
2016-04-30 01:24:24 +00:00
2014-08-13 03:44:30 +00:00
2015-05-01 18:32:16 +00:00