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