HomeFreeBSD

MFC: r300397

Description

MFC: r300397

  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."

  1. Move error detections earlier to prevent state modifying.

Details

Provenance
acheAuthored on
Parents
rS300945: Remove unnecessary caller_uaddr != NULL test before calling free on it
Branches
Unknown
Tags
Unknown