diff options
author | Stefan Weil <weil@mail.berlios.de> | 2011-04-03 18:21:24 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-04-08 11:32:20 +0200 |
commit | 8804f57b531e4887ad9521c9abb9e0bbbcb1dd4e (patch) | |
tree | 4bfbe38391fbfa5baaa568c59a2fd334917ca1f3 /hw | |
parent | 64a4d100b502f24d0116437b9e5678c032a233e6 (diff) |
spapr_vscsi: Set uninitialized variable
cppcheck reports this error:
hw/spapr_vscsi.c:274: error: Uninitialized variable: rc
If llen == 0, rc was indeed used without being initialized.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/spapr_vscsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c index e142dae624..992833450c 100644 --- a/hw/spapr_vscsi.c +++ b/hw/spapr_vscsi.c @@ -255,7 +255,7 @@ static int vscsi_srp_direct_data(VSCSIState *s, vscsi_req *req, { struct srp_direct_buf *md = req->cur_desc; uint32_t llen; - int rc; + int rc = 0; dprintf("VSCSI: direct segment 0x%x bytes, va=0x%llx desc len=0x%x\n", len, (unsigned long long)md->va, md->len); |