mirror of https://github.com/vitalif/e2fsprogs
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)bitmap-optimize
parent
87a6e45233
commit
023cbb3029
|
@ -1,3 +1,11 @@
|
|||
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
|
||||
|
|
|
@ -219,7 +219,7 @@ static void pattern_fill(unsigned char *buffer, unsigned long pattern,
|
|||
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)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue