1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2006-12-18  Jakub Jelinek  <jakub@redhat.com>
	[BZ #3747]
	* stdlib/jrand48_r.c (__jrand48_r): Make sure result is in the
	[-231 .. 231) range.
	* stdlib/tst-rand48.c (main): Fix expected values for 64-bit
	targets.
	* stdlib/tst-rand48-2.c: New test.
	* stdlib/Makefile (tests): Add tst-rand48-2.
This commit is contained in:
Ulrich Drepper
2006-12-19 08:18:18 +00:00
parent 9e1444fc3d
commit 5bcba0ed52
5 changed files with 140 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1997, 1998, 2001 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1997, 1998, 2001, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@ -30,7 +30,7 @@ __jrand48_r (xsubi, buffer, result)
return -1;
/* Store the result. */
*result = ((xsubi[2] << 16) | xsubi[1]) & 0xffffffffl;
*result = (int32_t) ((xsubi[2] << 16) | xsubi[1]);
return 0;
}