From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUnFH-00009A-H9 for qemu-devel@nongnu.org; Sun, 08 Mar 2015 22:16:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUnFE-0007YN-7K for qemu-devel@nongnu.org; Sun, 08 Mar 2015 22:16:39 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:52934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUnFD-0007Y8-EE for qemu-devel@nongnu.org; Sun, 08 Mar 2015 22:16:36 -0400 Message-ID: <54FD0267.60506@huawei.com> Date: Mon, 9 Mar 2015 10:16:07 +0800 From: Yik Fang MIME-Version: 1.0 References: <1423722111-12902-1-git-send-email-eric.fangyi@huawei.com> <54F3BC0A.4010209@huawei.com> In-Reply-To: <54F3BC0A.4010209@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] nbd: Fix overflow return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: armbru@redhat.com, qemu-devel@nongnu.org Cc: pbonzini@redhat.com Thanks to Markus for your help! On 2015/3/2 9:25, Fangyi (C) wrote: > PING > The value of reply.error should be the type unsigned int. > > Signed-off-by: Yik Fang > --- > nbd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/nbd.c b/nbd.c > index e56afbc1..30e2f3b 100644 > --- a/nbd.c > +++ b/nbd.c > @@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque) > default: > LOG("invalid request type (%u) received", request.type); > invalid_request: > - reply.error = -EINVAL; > + reply.error = EINVAL; > error_reply: > if (nbd_co_send_reply(req, &reply, 0) < 0) { > goto out; > -- 1.8.5 > > > >