K 10 svn:author V 4 ache K 8 svn:date V 27 2016-05-22T06:18:59.166110Z K 7 svn:log V 456 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 END