qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] spapr_vscsi: Set uninitialized variable


From: Benjamin Herrenschmidt
Subject: [Qemu-devel] Re: [PATCH] spapr_vscsi: Set uninitialized variable
Date: Tue, 05 Apr 2011 15:04:40 +1000

On Tue, 2011-04-05 at 14:14 +1000, David Gibson wrote:
> > >@@ -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;
> > 
> > David, is this correct? Or would rc be -1 when !llen?
> 
> I talked to Ben, who wrote this code - apparently his mail server blew
> up.  This patch should be correct, AFAWCT.  It's not totally clear
> what the right return value should be in thie case, or indeed that
> this case ever actually happens, but we think 0 is right. 

Just double checked and we never call that function if len is 0

Cheers,
Ben.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]