diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
| commit | cfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch) | |
| tree | 8016486f8ee7157213f2d09ff2491bfa9c94638a /tests/random.c | |
| parent | 14e4d584d0121031ec40e6c35869745f1747ff29 (diff) | |
| parent | 1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff) | |
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
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 97ba1691..4e3676d9 100644 --- a/tests/random.c +++ b/tests/random.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2024 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); |
