Skip to content
Snippets Groups Projects
Commit c9f2f38b authored by Jakob Olsson's avatar Jakob Olsson
Browse files

ubus_api_validator: refactor pass/fail logic

parent 0e82b6ed
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) {
}
}
// rc == res->rc handles negative testing
if (rv_validation || (rc == res->rc)) {
ok(true, format);
} else {
ok(false, format);
failed = 1;
}
if (!rv_validation || rc != res->rc) {
ok(false, format);
failed = 1;
} else
ok(true, format);
free(res);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment