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:
Yik Fang 2015-02-12 06:21:51 +00:00 committed by Paolo Bonzini
parent cd232acfa0
commit 8b2f0abfd6
1 changed files with 1 additions and 1 deletions

2
nbd.c
View File

@ -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;