Skip to content

Commit

Permalink
nbd: Fix overflow return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
yifang123 authored and bonzini committed Mar 18, 2015
1 parent cd232ac commit 8b2f0ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbd.c
Expand Up @@ -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;
Expand Down

0 comments on commit 8b2f0ab

Please sign in to comment.