提交 8b2f0abf 编写于 作者: Y Yik Fang 提交者: Paolo Bonzini

nbd: Fix overflow return value

The value of reply.error should be the type unsigned int.
Signed-off-by: NYik Fang <eric.fangyi@huawei.com>
Message-Id: <1423722111-12902-1-git-send-email-eric.fangyi@huawei.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 cd232acf
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册