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
Jan Kara 2013-02-25 05:55:05 +00:00 committed by Theodore Ts'o
parent bb21ddf596
commit 9e20cf223a
1 changed files with 1 additions and 1 deletions

View File

@ -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;