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

Function duplicate_node

compat/regex/regcomp.c:1607–1621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605 return idx; /* Found. */
1606 }
1607 return -1; /* Not found. */
1608}
1609
1610/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
1611 Return the index of the new node, or -1 if insufficient storage is
1612 available. */
1613
1614static int
1615duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint)
1616{
1617 int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
1618 if (BE (dup_idx != -1, 1))
1619 {
1620 dfa->nodes[dup_idx].constraint = constraint;
1621 dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
1622 dfa->nodes[dup_idx].duplicated = 1;
1623
1624 /* Store the index of the original node. */

Callers 1

duplicate_node_closureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected