mirror of https://github.com/vitalif/e2fsprogs
e2p: Fix 's' handling in parse_num_blocks2()
parse_num_blocks2() wrongly did: num << 1; when log_block_size < 0. That is obviously wrong as such statement has no effect (and the compiler properly warns about it). Callers expect returned value to be in bytes when log_block_size < 0 so fix the statement accordingly. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>debian-1.42.9
parent
bb21ddf596
commit
9e20cf223a
|
@ -42,7 +42,7 @@ unsigned long long parse_num_blocks2(const char *arg, int log_block_size)
|
|||
break;
|
||||
case 's':
|
||||
if (log_block_size < 0)
|
||||
num << 1;
|
||||
num <<= 9;
|
||||
else
|
||||
num >>= (1+log_block_size);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue