| 258 | |
| 259 | |
| 260 | static char *set_dynamic(struct command *cmd, |
| 261 | const char *arg, |
| 262 | bool check_only, |
| 263 | u32 *dynamic_opt) |
| 264 | { |
| 265 | int val = atol(arg); |
| 266 | |
| 267 | /* Whee, let's allow odd */ |
| 268 | if (val % 2 == 0) |
| 269 | return "I don't like \"even\" numbers (valid JSON? Try {})!"; |
| 270 | |
| 271 | if (check_only) |
| 272 | return NULL; |
| 273 | |
| 274 | *dynamic_opt = val; |
| 275 | return NULL; |
| 276 | } |
| 277 | |
| 278 | static const char *init(struct command *init_cmd, |
| 279 | const char *buf UNUSED, |
nothing calls this directly
no outgoing calls
no test coverage detected