Skip to content
Snippets Groups Projects
Commit 1a89e2da authored by Suru Dissanaike's avatar Suru Dissanaike
Browse files

Merge branch 'devel' into 'master'

ubus_api_validator: refactor pass/fail logic

See merge request !1
parents 0e82b6ed c9f2f38b
No related branches found
No related tags found
1 merge request!1ubus_api_validator: refactor pass/fail logic
...@@ -119,13 +119,11 @@ static int validate_jobj(struct json_object *jobj) { ...@@ -119,13 +119,11 @@ static int validate_jobj(struct json_object *jobj) {
} }
} }
// rc == res->rc handles negative testing if (!rv_validation || rc != res->rc) {
if (rv_validation || (rc == res->rc)) { ok(false, format);
ok(true, format); failed = 1;
} else { } else
ok(false, format); ok(true, format);
failed = 1;
}
free(res); free(res);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment