fixing up gcc -Wall nits. badblocks -t random was not
getting handled properly because ~0 needed to be cast to
an unsigned long instead of an unsigned char. (Addresses
Debian bug #234828)
+2004-02-26 Theodore Ts'o <tytso@mit.edu>
+
+ * badblocks.c (pattern_fill): Fix bug accidentally added when
+ fixing up gcc -Wall nits. badblocks -t random was not
+ getting handled properly because ~0 needed to be cast to
+ an unsigned long instead of an unsigned char. (Addresses
+ Debian bug #234828)
+
2004-02-21 Theodore Ts'o <tytso@mit.edu>
* fsck.c (execute): Use '&&' instead of '&'. (It didn't cause a
unsigned int i, nb;
unsigned char bpattern[sizeof(pattern)], *ptr;
- if (pattern == (unsigned char) ~0) {
+ if (pattern == (unsigned long) ~0) {
for (ptr = buffer; ptr < buffer + n; ptr++) {
(*ptr) = random() % (1 << (8 * sizeof(char)));
}