aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-06-29 14:25:01 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-07-13 13:46:55 -0300
commit94c3db85b4cc1d4e078859834a761bcc9d988780 (patch)
tree153a7261f23edf89dd341f5edf7a878a0775e56e /qapi
parentf5b0d93bcba712e1864c71c2f298c59a94efaa79 (diff)
downloadqemu-arm-94c3db85b4cc1d4e078859834a761bcc9d988780.tar.gz
qapi: input_type_enum(): fix error message
The enum string is pointed to by 'enum_str' not 'name'. This bug causes the error message to be: { "error": { "class": "InvalidParameter", "desc": "Invalid parameter 'null'", "data": { "name": "null" } } } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Amos Kong <akong@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qapi-visit-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index ffffbf79aa..705eca90aa 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -298,7 +298,7 @@ void input_type_enum(Visitor *v, int *obj, const char *strings[],
}
if (strings[value] == NULL) {
- error_set(errp, QERR_INVALID_PARAMETER, name ? name : "null");
+ error_set(errp, QERR_INVALID_PARAMETER, enum_str);
g_free(enum_str);
return;
}