MCPcopy Index your code
hub / github.com/git/git / add_child

Function add_child

daemon.c:825–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823} *firstborn;
824
825static void add_child(struct child_process *cld, struct sockaddr *addr, socklen_t addrlen)
826{
827 struct child *newborn, **cradle;
828
829 CALLOC_ARRAY(newborn, 1);
830 live_children++;
831 memcpy(&newborn->cld, cld, sizeof(*cld));
832 memcpy(&newborn->address, addr, addrlen);
833 for (cradle = &firstborn; *cradle; cradle = &(*cradle)->next)
834 if (!addrcmp(&(*cradle)->address, &newborn->address))
835 break;
836 newborn->next = *cradle;
837 *cradle = newborn;
838}
839
840/*
841 * This gets called if the number of connections grows

Callers 1

handleFunction · 0.70

Calls 1

addrcmpFunction · 0.85

Tested by

no test coverage detected