| 6662 | */ |
| 6663 | |
| 6664 | staticfn char * |
| 6665 | string_for_opt(char *opts, boolean val_optional) |
| 6666 | { |
| 6667 | char *colon, *equals; |
| 6668 | |
| 6669 | colon = strchr(opts, ':'); |
| 6670 | equals = strchr(opts, '='); |
| 6671 | if (!colon || (equals && equals < colon)) |
| 6672 | colon = equals; |
| 6673 | |
| 6674 | if (!colon || !*++colon) { |
| 6675 | if (!val_optional) |
| 6676 | config_error_add("Missing parameter for '%s'", opts); |
| 6677 | return empty_optstr; |
| 6678 | } |
| 6679 | return colon; |
| 6680 | } |
| 6681 | |
| 6682 | staticfn char * |
| 6683 | string_for_env_opt(const char *optname, char *opts, boolean val_optional) |
no test coverage detected