X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=prioq.c;fp=prioq.c;h=40801a62f7297859fe425a33677df25f72f83680;hb=4c8155fa9c85c7ece92182d0ab53f99a982a4abf;hp=9e49b81f3f41ff3a4f1d98d15edb0bfe127e8e75;hpb=128ea7fd4f9bb48a6ae51fe3f53e661b5399a1e6;p=catta diff --git a/prioq.c b/prioq.c index 9e49b81..40801a6 100644 --- a/prioq.c +++ b/prioq.c @@ -45,7 +45,7 @@ static flxPrioQueueNode* get_node_at_xy(flxPrioQueue *q, guint x, guint y) { } static void exchange_nodes(flxPrioQueue *q, flxPrioQueueNode *a, flxPrioQueueNode *b) { - flxPrioQueueNode *l, *r, *p, *ap, *an, *bp, *bn, *apl, *bpl; + flxPrioQueueNode *l, *r, *p, *ap, *an, *bp, *bn; gint t; g_assert(q); g_assert(a); @@ -128,6 +128,8 @@ static void exchange_nodes(flxPrioQueue *q, flxPrioQueueNode *a, flxPrioQueueNod b->left->parent = b; } } else { + flxPrioQueueNode *apl = NULL, *bpl = NULL; + /* Swap parents */ ap = a->parent; bp = b->parent;