From: Ulrich Drepper Date: Fri, 28 Aug 1998 12:07:12 +0000 (+0000) Subject: (__jrand48_r): Set also upper half of result. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4bb8d3a13962cb24f62af5d89ba769f08c3147;p=thirdparty%2Fglibc.git (__jrand48_r): Set also upper half of result. --- diff --git a/stdlib/jrand48_r.c b/stdlib/jrand48_r.c index 648604d4f54..b82e51d8925 100644 --- a/stdlib/jrand48_r.c +++ b/stdlib/jrand48_r.c @@ -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 , 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;