mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
(__jrand48_r): Set also upper half of result.
This commit is contained in:
parent
196f879726
commit
3e4bb8d3a1
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||
|
||||
@ -31,7 +31,7 @@ jrand48_r (xsubi, buffer, result)
|
||||
|
||||
/* Store the result. */
|
||||
if (sizeof (unsigned short int) == 2)
|
||||
*result = (xsubi[2] & 0x7fff) | xsubi[1];
|
||||
*result = ((xsubi[2] & 0x7fff) << 16) | xsubi[1];
|
||||
else
|
||||
*result = xsubi[2] & 0x7fffffffl;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user