Lines Matching refs:parent

90     if (a->parent == b) {  in exchange_nodes()
93 p = b->parent; in exchange_nodes()
94 b->parent = a; in exchange_nodes()
96 if ((a->parent = p)) { in exchange_nodes()
97 if (a->parent->left == b) in exchange_nodes()
98 a->parent->left = a; in exchange_nodes()
100 a->parent->right = a; in exchange_nodes()
106 b->left->parent = b; in exchange_nodes()
111 a->right->parent = a; in exchange_nodes()
113 b->right->parent = b; in exchange_nodes()
117 b->right->parent = b; in exchange_nodes()
122 a->left->parent = a; in exchange_nodes()
124 b->left->parent = b; in exchange_nodes()
126 } else if (b->parent == a) { in exchange_nodes()
129 p = a->parent; in exchange_nodes()
130 a->parent = b; in exchange_nodes()
132 if ((b->parent = p)) { in exchange_nodes()
133 if (b->parent->left == a) in exchange_nodes()
134 b->parent->left = b; in exchange_nodes()
136 b->parent->right = b; in exchange_nodes()
142 a->left->parent = a; in exchange_nodes()
147 a->right->parent = a; in exchange_nodes()
149 b->right->parent = b; in exchange_nodes()
152 a->right->parent = a; in exchange_nodes()
157 a->left->parent = a; in exchange_nodes()
159 b->left->parent = b; in exchange_nodes()
165 ap = a->parent; in exchange_nodes()
166 bp = b->parent; in exchange_nodes()
173 if ((a->parent = bp)) { in exchange_nodes()
181 if ((b->parent = ap)) { in exchange_nodes()
194 a->left->parent = a; in exchange_nodes()
197 b->left->parent = b; in exchange_nodes()
200 a->right->parent = a; in exchange_nodes()
203 b->right->parent = b; in exchange_nodes()
264 while (n->parent && q->compare(n->parent->data, n->data) > 0) in avahi_prio_queue_shuffle()
265 exchange_nodes(q, n, n->parent); in avahi_prio_queue_shuffle()
316 n->parent = get_node_at_xy(q, n->x/2, n->y-1); in avahi_prio_queue_put()
319 n->parent->right = n; in avahi_prio_queue_put()
321 n->parent->left = n; in avahi_prio_queue_put()
328 n->prev = n->parent = NULL; in avahi_prio_queue_put()
362 assert(n->parent); in avahi_prio_queue_remove()
364 assert(!n->parent); in avahi_prio_queue_remove()
366 if (n->parent) { in avahi_prio_queue_remove()
368 if (n->parent->left == n) { in avahi_prio_queue_remove()
369 assert(n->parent->right == NULL); in avahi_prio_queue_remove()
370 n->parent->left = NULL; in avahi_prio_queue_remove()
372 assert(n->parent->right == n); in avahi_prio_queue_remove()
373 assert(n->parent->left != NULL); in avahi_prio_queue_remove()
374 n->parent->right = NULL; in avahi_prio_queue_remove()