summaryrefslogtreecommitdiff
path: root/stdlib/random_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/random_r.c')
-rw-r--r--stdlib/random_r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/random_r.c b/stdlib/random_r.c
index f2fe923143..8c516780cd 100644
--- a/stdlib/random_r.c
+++ b/stdlib/random_r.c
@@ -185,7 +185,7 @@ __initstate_r (seed, arg_state, n, buf)
{
if (n < BREAK_0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
buf->rand_type = TYPE_0;
@@ -271,7 +271,7 @@ __setstate_r (arg_state, buf)
break;
default:
/* State info munged. */
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}