From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLoNY-0002uL-37 for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:40:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLoNT-0006R3-AS for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:40:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLoNT-0006Qv-3j for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:39:59 -0500 Date: Thu, 12 Feb 2015 15:38:09 +0800 From: Fam Zheng Message-ID: <20150212073809.GC32554@ad.nay.redhat.com> References: <1423722111-12902-1-git-send-email-eric.fangyi@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423722111-12902-1-git-send-email-eric.fangyi@huawei.com> Subject: Re: [Qemu-devel] [PATCH] nbd: Fix overflow return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yik Fang Cc: stefanha@redhat.com, kathy.wangting@huawei.com, qemu-devel@nongnu.org, boby.chen@huawei.com, rudy.zhangmin@huawei.com, wu.wubin@huawei.com On Thu, 02/12 06:21, Yik Fang wrote: > 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 > Reviewed-by: Fam Zheng