mirror of https://github.com/xqemu/xqemu.git
nbd: Fix overflow return value
The value of reply.error should be the type unsigned int. Signed-off-by: Yik Fang <eric.fangyi@huawei.com> Message-Id: <1423722111-12902-1-git-send-email-eric.fangyi@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
cd232acfa0
commit
8b2f0abfd6
2
nbd.c
2
nbd.c
|
@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)
|
||||||
default:
|
default:
|
||||||
LOG("invalid request type (%u) received", request.type);
|
LOG("invalid request type (%u) received", request.type);
|
||||||
invalid_request:
|
invalid_request:
|
||||||
reply.error = -EINVAL;
|
reply.error = EINVAL;
|
||||||
error_reply:
|
error_reply:
|
||||||
if (nbd_co_send_reply(req, &reply, 0) < 0) {
|
if (nbd_co_send_reply(req, &reply, 0) < 0) {
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue