Returns true if "name" was already registered and now overwritten. */
| 882 | |
| 883 | /* Returns true if "name" was already registered and now overwritten. */ |
| 884 | static bool plugin_opt_register(struct plugin_opt *popt) |
| 885 | { |
| 886 | bool was_registered = opt_unregister(popt->name); |
| 887 | if (streq(popt->type, "flag")) |
| 888 | opt_register_noarg(popt->name, plugin_opt_flag_set, popt, |
| 889 | popt->description); |
| 890 | else |
| 891 | opt_register_arg(popt->name, plugin_opt_set, NULL, popt, |
| 892 | popt->description); |
| 893 | |
| 894 | return was_registered; |
| 895 | } |
| 896 | |
| 897 | static void destroy_plugin_opt(struct plugin_opt *opt) |
| 898 | { |
no test coverage detected