| 301 | } |
| 302 | |
| 303 | static int toml_valid_identifier(const char *identifier) { |
| 304 | size_t length = 0U; |
| 305 | if (!identifier || identifier[0] == '\0' || |
| 306 | toml_bounded_length(identifier, 4096U, &length) != TOML_EDIT_OK) { |
| 307 | return 0; |
| 308 | } |
| 309 | for (size_t i = 0U; i < length; ++i) { |
| 310 | if (!toml_is_bare_key_char((unsigned char)identifier[i])) { |
| 311 | return 0; |
| 312 | } |
| 313 | } |
| 314 | return 1; |
| 315 | } |
| 316 | |
| 317 | static int toml_valid_marker(const char *marker) { |
| 318 | if (!marker || marker[0] == '\0') { |
no test coverage detected