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

Function toml_bounded_length

src/cli/config_toml_edit.c:267–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267static int toml_bounded_length(const char *text, size_t maximum, size_t *length_out) {
268 if (!text || !length_out) {
269 return TOML_EDIT_ERR;
270 }
271 size_t length = 0U;
272 while (length <= maximum && text[length] != '\0') {
273 length++;
274 }
275 if (length > maximum) {
276 return TOML_EDIT_ERR;
277 }
278 *length_out = length;
279 return TOML_EDIT_OK;
280}
281
282static int toml_valid_path(const char *path) {
283 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