diff options
Diffstat (limited to 'qapi/qapi-visit-core.c')
-rw-r--r-- | qapi/qapi-visit-core.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index a18ba1670f..5a7c900504 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -110,8 +110,8 @@ void visit_type_uint8(Visitor *v, uint8_t *obj, const char *name, Error **errp) value = *obj; v->type_int(v, &value, name, errp); if (value < 0 || value > UINT8_MAX) { - error_set(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null", - "uint8_t"); + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + name ? name : "null", "uint8_t"); return; } *obj = value; @@ -128,8 +128,8 @@ void visit_type_uint16(Visitor *v, uint16_t *obj, const char *name, Error **errp value = *obj; v->type_int(v, &value, name, errp); if (value < 0 || value > UINT16_MAX) { - error_set(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null", - "uint16_t"); + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + name ? name : "null", "uint16_t"); return; } *obj = value; @@ -146,8 +146,8 @@ void visit_type_uint32(Visitor *v, uint32_t *obj, const char *name, Error **errp value = *obj; v->type_int(v, &value, name, errp); if (value < 0 || value > UINT32_MAX) { - error_set(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null", - "uint32_t"); + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + name ? name : "null", "uint32_t"); return; } *obj = value; @@ -177,8 +177,8 @@ void visit_type_int8(Visitor *v, int8_t *obj, const char *name, Error **errp) value = *obj; v->type_int(v, &value, name, errp); if (value < INT8_MIN || value > INT8_MAX) { - error_set(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null", - "int8_t"); + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + name ? name : "null", "int8_t"); return; } *obj = value; @@ -195,8 +195,8 @@ void visit_type_int16(Visitor *v, int16_t *obj, const char *name, Error **errp) value = *obj; v->type_int(v, &value, name, errp); if (value < INT16_MIN || value > INT16_MAX) { - error_set(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null", - "int16_t"); + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + name ? name : "null", "int16_t"); return; } *obj = value; @@ -213,8 +213,8 @@ void visit_type_int32(Visitor *v, int32_t *obj, const char *name, Error **errp) value = *obj; v->type_int(v, &value, name, errp); if (value < INT32_MIN || value > INT32_MAX) { - error_set(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null", - "int32_t"); + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + name ? name : "null", "int32_t"); return; } *obj = value; @@ -271,7 +271,7 @@ void output_type_enum(Visitor *v, int *obj, const char * const strings[], assert(strings); while (strings[i++] != NULL); if (value < 0 || value >= i - 1) { - error_set(errp, QERR_INVALID_PARAMETER, name ? name : "null"); + error_setg(errp, QERR_INVALID_PARAMETER, name ? name : "null"); return; } @@ -303,7 +303,7 @@ void input_type_enum(Visitor *v, int *obj, const char * const strings[], } if (strings[value] == NULL) { - error_set(errp, QERR_INVALID_PARAMETER, enum_str); + error_setg(errp, QERR_INVALID_PARAMETER, enum_str); g_free(enum_str); return; } |