HomeFreeBSD

1) POSIX prohibits printing errors to stderr here and require

Description

  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.

MFC after: 1 week

Details

Provenance
acheAuthored on
Parents
rS300396: Commit the 1.0.1.0-k driver obtained from VMware under a BSD 2-clause license
Branches
Unknown
Tags
Unknown