refactor(options): convert opt_idx variables to OptIndex

This commit is contained in:
Famiu Haque
2023-12-07 23:59:30 +06:00
parent 6346987601
commit bf3bc1cec9
8 changed files with 133 additions and 132 deletions

View File

@@ -669,8 +669,8 @@ static void set_option_to(uint64_t channel_id, void *to, OptReqScope req_scope,
return;
});
int opt_idx = findoption(name.data);
VALIDATE_S(opt_idx >= 0, "option name", name.data, {
OptIndex opt_idx = findoption(name.data);
VALIDATE_S(opt_idx != kOptInvalid, "option name", name.data, {
return;
});