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

Function check_literal

lightningd/configs.c:101–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101static void check_literal(const char *name, const char *val)
102{
103 if (streq(val, "true") || streq(val, "false"))
104 return;
105 if (!streq(val, "") && strspn(val, "-0123456789.") == strlen(val))
106 return;
107 errx(1, "Bad literal for %s: %s", name, val);
108}
109
110static void json_add_configval(struct json_stream *result,
111 const char *fieldname,

Callers 1

json_add_configvalFunction · 0.85

Calls 1

errxFunction · 0.85

Tested by

no test coverage detected