[PATCH] Avoid a build warning on 32-bit platforms

From: Chris Wedgwood
Date: Tue Oct 19 2004 - 22:04:46 EST


Avoid a build warning on 32-bit platforms.

Signed-off-by: cw@xxxxxxxx



Is this too ugly for words? :)


diff -Nru a/drivers/char/random.c b/drivers/char/random.c
--- a/drivers/char/random.c 2004-10-19 17:48:36 -07:00
+++ b/drivers/char/random.c 2004-10-19 17:48:36 -07:00
@@ -818,11 +818,12 @@
* jiffies.
*/
time = get_cycles();
- if (time != 0) {
- if (sizeof(time) > 4)
- num ^= (u32)(time >> 32);
- } else {
+ if (!time)
time = jiffies;
+ else {
+#if (BITS_PER_LONG > 32)
+ num ^= (u32)(time >> 32);
+#endif /* (BITS_PER_LONG > 32) */
}

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/