diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:29:05 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:29:05 +0100 |
| commit | 33a5320dda21ae791eee4763c64f1285ae04217d (patch) | |
| tree | 5c15bc695be820b393a8496c5807ecafbbdeb89b /tests/random.c | |
| parent | b2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff) | |
| parent | ff33e1d252f46bec1a33e28700da3282fc24047a (diff) | |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'tests/random.c')
| -rw-r--r-- | tests/random.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/random.c b/tests/random.c index e0d4b07a..4e3676d9 100644 --- a/tests/random.c +++ b/tests/random.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2025 Free Software Foundation, Inc. +/* Copyright (C) 1995-2026 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -246,14 +246,11 @@ weak_alias (__srandom, srand) char * __initstate (unsigned int seed, char *arg_state, size_t n) { - int32_t *ostate; - int ret; - __libc_lock_lock (lock); - ostate = &unsafe_state.state[-1]; + int32_t *ostate = &unsafe_state.state[-1]; - ret = __initstate_r (seed, arg_state, n, &unsafe_state); + int ret = __initstate_r (seed, arg_state, n, &unsafe_state); __libc_lock_unlock (lock); @@ -273,11 +270,9 @@ weak_alias (__initstate, initstate) char * __setstate (char *arg_state) { - int32_t *ostate; - __libc_lock_lock (lock); - ostate = &unsafe_state.state[-1]; + int32_t *ostate = &unsafe_state.state[-1]; if (__setstate_r (arg_state, &unsafe_state) < 0) ostate = NULL; @@ -303,10 +298,9 @@ weak_alias (__setstate, setstate) long int __random (void) { - int32_t retval; - __libc_lock_lock (lock); + int32_t retval; (void) __random_r (&unsafe_state, &retval); __libc_lock_unlock (lock); |
