From 5f59a34ab747dde8ede7357f3431bf06bd6002fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 8 Mar 2026 17:28:33 +0100 Subject: New upstream version 1.4.2 --- tests/random.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'tests/random.c') 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); -- cgit v1.2.3