mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
Remove general shadowed variables.
We shadow local variables in several places: generally, these changes make the code clearer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
6a7d40f51a
commit
6fe570820e
@@ -1021,15 +1021,15 @@ static struct command_result *handle_init(struct command *cmd,
|
||||
opttok = json_get_member(buf, params, "options");
|
||||
json_for_each_obj(i, t, opttok) {
|
||||
char *opt = json_strdup(NULL, buf, t);
|
||||
for (size_t i = 0; i < tal_count(p->opts); i++) {
|
||||
for (size_t optnum = 0; optnum < tal_count(p->opts); optnum++) {
|
||||
char *problem;
|
||||
if (!streq(p->opts[i].name, opt))
|
||||
if (!streq(p->opts[optnum].name, opt))
|
||||
continue;
|
||||
problem = p->opts[i].handle(json_strdup(opt, buf, t+1),
|
||||
p->opts[i].arg);
|
||||
problem = p->opts[optnum].handle(json_strdup(opt, buf, t+1),
|
||||
p->opts[optnum].arg);
|
||||
if (problem)
|
||||
plugin_err(p, "option '%s': %s",
|
||||
p->opts[i].name, problem);
|
||||
p->opts[optnum].name, problem);
|
||||
break;
|
||||
}
|
||||
tal_free(opt);
|
||||
|
||||
Reference in New Issue
Block a user