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

Function gic_invalid_open

tests/test_gitignore_checked.c:331–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331static bool gic_invalid_open(unsigned kind) {
332 cbm_ignore_checked_limits_t limits = gic_limits();
333 if (kind == 0)
334 limits.max_bytes = 0;
335 if (kind == 1)
336 limits.max_work = 0;
337 if (kind == 2)
338 limits.max_patterns = 0;
339 if (kind == 3)
340 limits.max_arena_bytes = 0;
341 if (kind == 4)
342 limits.max_depth = 0;
343 if (kind == 5)
344 limits.max_depth = CBM_IGNORE_CHECKED_DEPTH_MAX + 1;
345 if (kind == 6)
346 limits.max_patterns = (size_t)INT_MAX + 1;
347 cbm_ignore_checked_t *owner = NULL;
348 cbm_ignore_checked_error_t error;
349 cbm_ignore_checked_status_t status =
350 cbm_ignore_checked_open(kind == 7 ? NULL : &limits, kind == 8 ? NULL : &owner, &error);
351 bool ok = gic_status(status, CBM_IGNORE_CHECKED_INVALID, &error) && !owner;
352 cbm_ignore_checked_free(owner);
353 return ok;
354}
355
356static bool gic_optional_errors(cbm_ignore_checked_t *retained) {
357 cbm_ignore_checked_t *owner = NULL;

Callers 1

Calls 4

gic_limitsFunction · 0.85
cbm_ignore_checked_openFunction · 0.85
gic_statusFunction · 0.85
cbm_ignore_checked_freeFunction · 0.85

Tested by

no test coverage detected