Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55137
b: refs/heads/master
c: e7a23a9
h: refs/heads/master
i:
  55135: af48bde
v: v3
  • Loading branch information
Joe Perches authored and Tim Shimmin committed May 8, 2007
1 parent 0d7c52f commit cc9832b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9ed9d2240c71014a84043095af4465ffce61367
refs/heads/master: e7a23a9b37c395a153a541d4c50e166eef6abe49
17 changes: 0 additions & 17 deletions trunk/fs/xfs/support/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion trunk/fs/xfs/support/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern void assfail(char *expr, char *f, int l);
#else /* DEBUG */

# define ASSERT(expr) ASSERT_ALWAYS(expr)
extern unsigned long random(void);
# include <linux/random.h>

#ifndef STATIC
# define STATIC noinline
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ xfs_alloc_ag_vextent_near(
*/
int dofirst; /* set to do first algorithm */

dofirst = random() & 1;
dofirst = random32() & 1;
#endif
/*
* Get a cursor for the by-size btree.
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
int i;
int64_t fsid;

if (random() % randfactor)
if (random32() % randfactor)
return 0;

memcpy(&fsid, fsidp, sizeof(xfs_fsid_t));
Expand Down

0 comments on commit cc9832b

Please sign in to comment.