MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / toml_bounded_length

Function toml_bounded_length

src/cli/config_toml_edit.c:271–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static int toml_bounded_length(const char *text, size_t maximum, size_t *length_out) {
272 if (!text || !length_out) {
273 return TOML_EDIT_ERR;
274 }
275 size_t length = 0U;
276 while (length <= maximum && text[length] != '\0') {
277 length++;
278 }
279 if (length > maximum) {
280 return TOML_EDIT_ERR;
281 }
282 *length_out = length;
283 return TOML_EDIT_OK;
284}
285
286static int toml_valid_path(const char *path) {
287 size_t len = 0U;

Callers 8

toml_valid_pathFunction · 0.85
toml_valid_identifierFunction · 0.85
toml_valid_markerFunction · 0.85
toml_named_inputs_validFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected