aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qga/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qga/main.c b/qga/main.c
index 6caf215575..538e4ee299 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -558,8 +558,8 @@ static void process_command(GAState *s, QDict *req)
rsp = qmp_dispatch(QOBJECT(req));
if (rsp) {
ret = send_response(s, rsp);
- if (ret) {
- g_warning("error sending response: %s", strerror(ret));
+ if (ret < 0) {
+ g_warning("error sending response: %s", strerror(-ret));
}
qobject_decref(rsp);
}