From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVVRT-0007Dc-7Z for qemu-devel@nongnu.org; Tue, 10 Mar 2015 21:28:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVVRQ-0007FO-1a for qemu-devel@nongnu.org; Tue, 10 Mar 2015 21:28:11 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:3923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVVRP-0007EG-8m for qemu-devel@nongnu.org; Tue, 10 Mar 2015 21:28:07 -0400 Message-ID: <54FF9A17.10600@huawei.com> Date: Wed, 11 Mar 2015 09:27:51 +0800 From: Yik Fang MIME-Version: 1.0 References: <54FD0267.60506@huawei.com> In-Reply-To: <54FD0267.60506@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] nbd: Fix overflow return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pbonzini@redhat.com, qemu-devel@nongnu.org Paolo, Can you have a look at this patch, and give me some advices? Regards, Yik Fang -------- 转发的消息 -------- 主题: Re: [Qemu-devel] [PATCH] nbd: Fix overflow return value 日期: Mon, 9 Mar 2015 10:16:07 +0800 发件人: Yik Fang 收件人: armbru@redhat.com, qemu-devel@nongnu.org 抄送: 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 > > > >