MCPcopy Create free account
hub / github.com/ElementsProject/lightning / opt_unregister

Function opt_unregister

ccan/ccan/opt/opt.c:179–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179bool opt_unregister(const char *names)
180{
181 int found = -1, i;
182
183 for (i = 0; i < opt_count; i++) {
184 if (opt_table[i].type == OPT_SUBTABLE)
185 continue;
186 if (strcmp(opt_table[i].names, names) == 0)
187 found = i;
188 }
189 if (found == -1)
190 return false;
191 opt_count--;
192 memmove(&opt_table[found], &opt_table[found+1],
193 (opt_count - found) * sizeof(opt_table[found]));
194 return true;
195}
196
197void opt_register_table(const struct opt_table entry[], const char *desc)
198{

Callers 3

mainFunction · 0.85
plugin_opt_registerFunction · 0.85
destroy_plugin_optFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68