diff options
author | Yik Fang <eric.fangyi@huawei.com> | 2015-02-12 06:21:51 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-03-18 12:02:37 +0100 |
commit | 8b2f0abfd61237b301a29e814535b1e36d733aaa (patch) | |
tree | b61a4bbb034f8e6c6d372540a5d0db009d5ddd5e /nbd.c | |
parent | cd232acfa0d70002fed89e9293f04afda577a513 (diff) |
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>
Diffstat (limited to 'nbd.c')
-rw-r--r-- | nbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |