qemu-e2k/block
Stefan Weil 514f21a5d4 vdi: Fix warning from clang
ccc-analyzer reports these warnings:

block/vdi.c:704:13: warning: Dereference of null pointer
            bmap[i] = VDI_UNALLOCATED;
            ^
block/vdi.c:702:13: warning: Dereference of null pointer
            bmap[i] = i;
            ^

Moving some code into the if block fixes this.
It also avoids calling function write with 0 bytes of data.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-09-12 15:50:09 +02:00
..
blkdebug.c
blkverify.c
bochs.c
cloop.c
cow.c
curl.c block/curl: Fix wrong free statement 2012-09-12 15:50:09 +02:00
dmg.c
iscsi.c
Makefile.objs
nbd.c
parallels.c
qcow2-cache.c
qcow2-cluster.c
qcow2-refcount.c
qcow2-snapshot.c
qcow2.c
qcow2.h
qcow.c
qed-check.c
qed-cluster.c
qed-gencb.c
qed-l2-cache.c
qed-table.c
qed.c
qed.h
raw-posix-aio.h
raw-posix.c
raw-win32.c
raw.c
rbd.c
sheepdog.c
stream.c
vdi.c vdi: Fix warning from clang 2012-09-12 15:50:09 +02:00
vmdk.c
vpc.c
vvfat.c