| 292 | } |
| 293 | |
| 294 | static int toml_valid_identifier(const char *identifier) { |
| 295 | size_t length = 0U; |
| 296 | if (!identifier || identifier[0] == '\0' || |
| 297 | toml_bounded_length(identifier, 4096U, &length) != TOML_EDIT_OK) { |
| 298 | return 0; |
| 299 | } |
| 300 | for (size_t i = 0U; i < length; ++i) { |
| 301 | if (!toml_is_bare_key_char((unsigned char)identifier[i])) { |
| 302 | return 0; |
| 303 | } |
| 304 | } |
| 305 | return 1; |
| 306 | } |
| 307 | |
| 308 | static int toml_valid_marker(const char *marker) { |
| 309 | if (!marker || marker[0] == '\0') { |
no test coverage detected