X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fadt%2Fpqueue.c;h=6e43abf7c1a3e88c7f14c66cfc1c3b0784f96706;hb=d44b3844af84684de9b0213b77c175f80f8b84ee;hp=317c82a675124bed1370199cd7999f0612705a5d;hpb=974215da1a935f250766874d0f7a7ddfa34bc4ef;p=libfirm diff --git a/ir/adt/pqueue.c b/ir/adt/pqueue.c index 317c82a67..6e43abf7c 100644 --- a/ir/adt/pqueue.c +++ b/ir/adt/pqueue.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -56,12 +56,12 @@ struct _pqueue_t { * Enforces the heap characteristics if the queue * starting from element at position @p pos. */ -static void pqueue_heapify(pqueue *q, int pos) { - int len = ARR_LEN(q->elems); +static void pqueue_heapify(pqueue *q, unsigned pos) { + unsigned len = ARR_LEN(q->elems); while (pos * 2 < len) { pqueue_el_t tmp; - int exchange = pos; + unsigned exchange = pos; if (q->elems[exchange].key < q->elems[pos * 2].key) { exchange = pos * 2; @@ -85,7 +85,7 @@ static void pqueue_heapify(pqueue *q, int pos) { /** * Sifts up a newly inserted element at position @p pos. */ -static void pqueue_sift_up(pqueue *q, int pos) { +static void pqueue_sift_up(pqueue *q, unsigned pos) { while(q->elems[pos].key > q->elems[pos / 2].key) { pqueue_el_t tmp;