]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
Cleanup: bdrv_open() no need to shift total_size just to shift back.
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 27 May 2010 14:20:30 +0000 (16:20 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 4 Jun 2010 09:43:39 +0000 (11:43 +0200)
commit3e82990b52d5afeb4957dd9b87be83d752e369b9
treeba5c89885d52e6c2e240e21393c92f822d677c04
parent358c360feb346dff8f911e2d1dbcdd6319393f1d
Cleanup: bdrv_open() no need to shift total_size just to shift back.

In bdrv_open() there is no need to shift total_size >> 9 just to
multiply it by 512 again just a few lines later, since this is the
only place the variable is used.

Mask with BDRV_SECTOR_MASK to protect against case where we are
passed a corrupted image.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c