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

Function opt_set_autobool_arg

lightningd/options.c:114–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114char *opt_set_autobool_arg(const char *arg, enum opt_autobool *b)
115{
116 if (!strcasecmp(arg, "yes") ||
117 !strcasecmp(arg, "true")) {
118 *b = OPT_AUTOBOOL_TRUE;
119 return NULL;
120 }
121 if (!strcasecmp(arg, "no") ||
122 !strcasecmp(arg, "false")) {
123 *b = OPT_AUTOBOOL_FALSE;
124 return NULL;
125 }
126 if (!strcasecmp(arg, "auto") ||
127 !strcasecmp(arg, "default")) {
128 *b = OPT_AUTOBOOL_AUTO;
129 return NULL;
130 }
131 return opt_invalid_argument(arg);
132}
133
134bool opt_show_autobool(char *buf, size_t len, const enum opt_autobool *b)
135{

Callers

nothing calls this directly

Calls 1

opt_invalid_argumentFunction · 0.85

Tested by

no test coverage detected