MCPcopy Create free account
hub / github.com/git/git / check_vector_remove

Function check_vector_remove

attr.c:502–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502static void check_vector_remove(struct attr_check *check)
503{
504 int i;
505
506 vector_lock();
507
508 /* Find entry */
509 for (i = 0; i < check_vector.nr; i++)
510 if (check_vector.checks[i] == check)
511 break;
512
513 if (i >= check_vector.nr)
514 BUG("no entry found");
515
516 /* shift entries over */
517 for (; i < check_vector.nr - 1; i++)
518 check_vector.checks[i] = check_vector.checks[i + 1];
519
520 check_vector.nr--;
521
522 vector_unlock();
523}
524
525/* Iterate through all attr_check instances and drop their stacks */
526static void drop_all_attr_stacks(void)

Callers 1

attr_check_freeFunction · 0.85

Calls 2

vector_lockFunction · 0.85
vector_unlockFunction · 0.85

Tested by

no test coverage detected