diff options
author | ache <ache@FreeBSD.org> | 2016-05-22 06:18:59 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2016-05-22 06:18:59 +0000 |
commit | ba8920d51c60e1f2bbe50aa9c8504207cf86bf9b (patch) | |
tree | 5041785dd6fd7fb28536bab08df6347d316f6b42 /lib/libc/stdio/setbuffer.c | |
parent | 037853325081b53767df0c034cda3c14ea99dc0d (diff) | |
download | FreeBSD-src-ba8920d51c60e1f2bbe50aa9c8504207cf86bf9b.zip FreeBSD-src-ba8920d51c60e1f2bbe50aa9c8504207cf86bf9b.tar.gz |
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
Diffstat (limited to 'lib/libc/stdio/setbuffer.c')
0 files changed, 0 insertions, 0 deletions