aboutsummaryrefslogtreecommitdiff
path: root/nbd.c
diff options
context:
space:
mode:
authorYik Fang <eric.fangyi@huawei.com>2015-02-12 06:21:51 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2015-03-18 12:02:37 +0100
commit8b2f0abfd61237b301a29e814535b1e36d733aaa (patch)
treeb61a4bbb034f8e6c6d372540a5d0db009d5ddd5e /nbd.c
parentcd232acfa0d70002fed89e9293f04afda577a513 (diff)
downloadqemu-8b2f0abfd61237b301a29e814535b1e36d733aaa.zip
qemu-8b2f0abfd61237b301a29e814535b1e36d733aaa.tar.gz
qemu-8b2f0abfd61237b301a29e814535b1e36d733aaa.tar.bz2
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nbd.c b/nbd.c
index 71159af..02ba0fe 100644
--- a/nbd.c
+++ b/nbd.c
@@ -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;