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

Function runtime_bounded_length

src/daemon/runtime.c:308–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308static bool runtime_bounded_length(const char *value, size_t capacity, size_t *length_out) {
309 if (!value || capacity == 0) {
310 return false;
311 }
312 for (size_t i = 0; i < capacity; i++) {
313 if (value[i] == '\0') {
314 if (length_out) {
315 *length_out = i;
316 }
317 return true;
318 }
319 }
320 return false;
321}
322
323static bool runtime_wire_string_encode(uint8_t *out, size_t capacity, const char *value,
324 bool allow_empty) {

Calls

no outgoing calls

Tested by

no test coverage detected