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

Function opt_unregister

ccan/ccan/opt/opt.c:180–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

mainFunction · 0.85
destroy_plugin_optFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68