diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-05-02 13:26:29 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-05-08 14:20:00 -0400 |
commit | e940f543ae7606819c9083fdb524e5b85914f032 (patch) | |
tree | 41a016f0ee62766627165bd1563b7994c723ec9a /tests/test-qmp-input-strict.c | |
parent | 636713bad4240836947c04c26e1cd001d3bcbff1 (diff) |
qmp hmp: Consistently name Error * objects err, and not errp
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'tests/test-qmp-input-strict.c')
-rw-r--r-- | tests/test-qmp-input-strict.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/tests/test-qmp-input-strict.c b/tests/test-qmp-input-strict.c index f03353b755..449d285e56 100644 --- a/tests/test-qmp-input-strict.c +++ b/tests/test-qmp-input-strict.c @@ -86,13 +86,13 @@ static void test_validate_struct(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo' }"); - visit_type_TestStruct(v, &p, NULL, &errp); - g_assert(!errp); + visit_type_TestStruct(v, &p, NULL, &err); + g_assert(!err); g_free(p->string); g_free(p); } @@ -101,13 +101,13 @@ static void test_validate_struct_nested(TestInputVisitorData *data, const void *unused) { UserDefNested *udp = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'string0': 'string0', 'dict1': { 'string1': 'string1', 'dict2': { 'userdef1': { 'integer': 42, 'string': 'string' }, 'string2': 'string2'}}}"); - visit_type_UserDefNested(v, &udp, NULL, &errp); - g_assert(!errp); + visit_type_UserDefNested(v, &udp, NULL, &err); + g_assert(!err); qapi_free_UserDefNested(udp); } @@ -115,13 +115,13 @@ static void test_validate_list(TestInputVisitorData *data, const void *unused) { UserDefOneList *head = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, { 'string': 'string2', 'integer': 44 } ]"); - visit_type_UserDefOneList(v, &head, NULL, &errp); - g_assert(!errp); + visit_type_UserDefOneList(v, &head, NULL, &err); + g_assert(!err); qapi_free_UserDefOneList(head); } @@ -130,12 +130,12 @@ static void test_validate_union(TestInputVisitorData *data, { UserDefUnion *tmp = NULL; Visitor *v; - Error *errp = NULL; + Error *err = NULL; v = validate_test_init(data, "{ 'type': 'b', 'integer': 41, 'data' : { 'integer': 42 } }"); - visit_type_UserDefUnion(v, &tmp, NULL, &errp); - g_assert(!errp); + visit_type_UserDefUnion(v, &tmp, NULL, &err); + g_assert(!err); qapi_free_UserDefUnion(tmp); } @@ -144,7 +144,7 @@ static void test_validate_union_flat(TestInputVisitorData *data, { UserDefFlatUnion *tmp = NULL; Visitor *v; - Error *errp = NULL; + Error *err = NULL; v = validate_test_init(data, "{ 'enum1': 'value1', " @@ -152,8 +152,8 @@ static void test_validate_union_flat(TestInputVisitorData *data, "'boolean': true }"); /* TODO when generator bug is fixed, add 'integer': 41 */ - visit_type_UserDefFlatUnion(v, &tmp, NULL, &errp); - g_assert(!errp); + visit_type_UserDefFlatUnion(v, &tmp, NULL, &err); + g_assert(!err); qapi_free_UserDefFlatUnion(tmp); } @@ -162,12 +162,12 @@ static void test_validate_union_anon(TestInputVisitorData *data, { UserDefAnonUnion *tmp = NULL; Visitor *v; - Error *errp = NULL; + Error *err = NULL; v = validate_test_init(data, "42"); - visit_type_UserDefAnonUnion(v, &tmp, NULL, &errp); - g_assert(!errp); + visit_type_UserDefAnonUnion(v, &tmp, NULL, &err); + g_assert(!err); qapi_free_UserDefAnonUnion(tmp); } @@ -175,13 +175,13 @@ static void test_validate_fail_struct(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo', 'extra': 42 }"); - visit_type_TestStruct(v, &p, NULL, &errp); - g_assert(errp); + visit_type_TestStruct(v, &p, NULL, &err); + g_assert(err); if (p) { g_free(p->string); } @@ -192,13 +192,13 @@ static void test_validate_fail_struct_nested(TestInputVisitorData *data, const void *unused) { UserDefNested *udp = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'string0': 'string0', 'dict1': { 'string1': 'string1', 'dict2': { 'userdef1': { 'integer': 42, 'string': 'string', 'extra': [42, 23, {'foo':'bar'}] }, 'string2': 'string2'}}}"); - visit_type_UserDefNested(v, &udp, NULL, &errp); - g_assert(errp); + visit_type_UserDefNested(v, &udp, NULL, &err); + g_assert(err); qapi_free_UserDefNested(udp); } @@ -206,13 +206,13 @@ static void test_validate_fail_list(TestInputVisitorData *data, const void *unused) { UserDefOneList *head = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, { 'string': 'string2', 'integer': 44, 'extra': 'ggg' } ]"); - visit_type_UserDefOneList(v, &head, NULL, &errp); - g_assert(errp); + visit_type_UserDefOneList(v, &head, NULL, &err); + g_assert(err); qapi_free_UserDefOneList(head); } @@ -220,13 +220,13 @@ static void test_validate_fail_union(TestInputVisitorData *data, const void *unused) { UserDefUnion *tmp = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }"); - visit_type_UserDefUnion(v, &tmp, NULL, &errp); - g_assert(errp); + visit_type_UserDefUnion(v, &tmp, NULL, &err); + g_assert(err); qapi_free_UserDefUnion(tmp); } @@ -234,13 +234,13 @@ static void test_validate_fail_union_flat(TestInputVisitorData *data, const void *unused) { UserDefFlatUnion *tmp = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'string': 'c', 'integer': 41, 'boolean': true }"); - visit_type_UserDefFlatUnion(v, &tmp, NULL, &errp); - g_assert(errp); + visit_type_UserDefFlatUnion(v, &tmp, NULL, &err); + g_assert(err); qapi_free_UserDefFlatUnion(tmp); } @@ -249,12 +249,12 @@ static void test_validate_fail_union_anon(TestInputVisitorData *data, { UserDefAnonUnion *tmp = NULL; Visitor *v; - Error *errp = NULL; + Error *err = NULL; v = validate_test_init(data, "3.14"); - visit_type_UserDefAnonUnion(v, &tmp, NULL, &errp); - g_assert(errp); + visit_type_UserDefAnonUnion(v, &tmp, NULL, &err); + g_assert(err); qapi_free_UserDefAnonUnion(tmp); } |