lib/libvarnishapi/vsl_dispatch.c
static void
vtx_set_parent(struct vtx *parent, struct vtx *child)
{

	CHECK_OBJ_NOTNULL(parent, VTX_MAGIC);
	CHECK_OBJ_NOTNULL(child, VTX_MAGIC);
	assert(parent != child);
	AZ(parent->flags & VTX_F_COMPLETE);
	AZ(child->flags & VTX_F_COMPLETE);
	AZ(child->parent);
	child->parent = parent;
	VTAILQ_INSERT_TAIL(&parent->child, child, list_child);
	parent->n_child++;
	do
		parent->n_descend += 1 + child->n_descend;
	while ((parent = parent->parent) != NULL);
}
/* Add a child to a parent, and update child counters */
Add a child to a parent, and update child counters
Add a child to a parent and update child counters
static void
vtx_set_parent(struct vtx *parent, struct vtx *child)
{
	CHECK_OBJ_NOTNULL(parent, VTX_MAGIC);
	CHECK_OBJ_NOTNULL(child, VTX_MAGIC);
	assert(parent != child);
	AZ(parent->flags & VTX_F_COMPLETE);
	AZ(child->flags & VTX_F_COMPLETE);
	AZ(child->parent);
	child->parent = parent;
	VTAILQ_INSERT_TAIL(&parent->child, child, list_child);
	parent->n_child++;
	do
		parent->n_descend += 1 + child->n_descend;
	while ((parent = parent->parent) != NULL);
}
static void vtx_set_parent ( struct vtx * parent , struct vtx * child ) { CHECK_OBJ_NOTNULL ( parent , VTX_MAGIC ) ; CHECK_OBJ_NOTNULL ( child , VTX_MAGIC ) ; assert ( parent != child ) ; AZ ( parent -> flags & VTX_F_COMPLETE ) ; AZ ( child -> flags & VTX_F_COMPLETE ) ; AZ ( child -> parent ) ; child -> parent = parent ; VTAILQ_INSERT_TAIL ( & parent -> child , child , list_child ) ; parent -> n_child ++ ; do parent -> n_descend += 1 + child -> n_descend ; while ( ( parent = parent -> parent ) != NULL ) ; }
Add a child to a parent, and update child counters
Add a child to a parent and update child counters