From e7a23a9b37c395a153a541d4c50e166eef6abe49 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 8 May 2007 13:49:03 +1000 Subject: [XFS] reducing the number of random number functions. Patch provided by Joe Perches SGI-PV: 961696 SGI-Modid: xfs-linux-melb:xfs-kern:28209a Signed-off-by: Joe Perches Signed-off-by: Lachlan McIlroy Signed-off-by: Tim Shimmin --- fs/xfs/support/debug.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'fs/xfs/support/debug.c') diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c index 08bbd3cb87a..f45a49ffd3a 100644 --- a/fs/xfs/support/debug.c +++ b/fs/xfs/support/debug.c @@ -81,20 +81,3 @@ assfail(char *expr, char *file, int line) printk("Assertion failed: %s, file: %s, line: %d\n", expr, file, line); BUG(); } - -#if ((defined(DEBUG) || defined(INDUCE_IO_ERRROR)) && !defined(NO_WANT_RANDOM)) -unsigned long random(void) -{ - static unsigned long RandomValue = 1; - /* cycles pseudo-randomly through all values between 1 and 2^31 - 2 */ - register long rv = RandomValue; - register long lo; - register long hi; - - hi = rv / 127773; - lo = rv % 127773; - rv = 16807 * lo - 2836 * hi; - if (rv <= 0) rv += 2147483647; - return RandomValue = rv; -} -#endif /* DEBUG || INDUCE_IO_ERRROR || !NO_WANT_RANDOM */ -- cgit v1.2.3