From 75e218b7f269fe7e3238cda5daabdd702b2f4ed5 Mon Sep 17 00:00:00 2001 From: Michele Bini Date: Mon, 30 Sep 2013 08:50:06 +0200 Subject: [PATCH] Compilation fix for more recent GCC compiler --- src/igs.c | 2 +- src/llist.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/igs.c b/src/igs.c index aa38a69..58ad34b 100644 --- a/src/igs.c +++ b/src/igs.c @@ -658,7 +658,7 @@ void igw_order(inet_gw **igws, int *igws_counter, inet_gw **my_igws, int level) if(!igws_counter[level] || !igws[level]) return; - new_head=clist_qsort(igws[level], igws_counter[level], igw_cmp); + clist_qsort(new_head, igws[level], igws_counter[level], igw_cmp); igw=new_head; list_for(igw) { diff --git a/src/llist.c b/src/llist.c index df92300..a10707c 100644 --- a/src/llist.c +++ b/src/llist.c @@ -606,9 +606,9 @@ do{ \ * should be aware of this. * - it follows the new order of `tmp' and appends each array element in * a new llist. - * - the head of the new llist is returned. + * - the head of the new llist is assigned to _new_head */ -#define clist_qsort(_head, _counter, _cmp_func) \ +#define clist_qsort(_new_head, _head, _counter, _cmp_func) \ ({ \ l_list *_hcq=(l_list *)(_head), *_ncq, *_hecq, *_tcq; \ int _icq=0, _ccq; \ @@ -629,7 +629,7 @@ do{ \ for(_icq=0; _icq<_ccq; _icq++) \ _tcq=(l_list *)list_append(0, _tcq, _tmp_list[_icq]); \ \ - (typeof((_head)))_hecq; \ + _new_head = (typeof((_head)))_hecq; \ }) \ #endif /*LLIST_C*/