Sfoglia il codice sorgente

Compilation fix for more recent GCC compiler

Michele Bini 11 anni fa
parent
commit
75e218b7f2
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 1
    1
      src/igs.c
  2. 3
    3
      src/llist.c

+ 1
- 1
src/igs.c Vedi File

@@ -658,7 +658,7 @@ void igw_order(inet_gw **igws, int *igws_counter, inet_gw **my_igws, int level)
658 658
 	if(!igws_counter[level] || !igws[level])
659 659
 		return;
660 660
 	
661
-	new_head=clist_qsort(igws[level], igws_counter[level], igw_cmp);
661
+	clist_qsort(new_head, igws[level], igws_counter[level], igw_cmp);
662 662
 	
663 663
 	igw=new_head;
664 664
 	list_for(igw) {

+ 3
- 3
src/llist.c Vedi File

@@ -606,9 +606,9 @@ do{                  							\
606 606
  *        should be aware of this.
607 607
  * 	- it follows the new order of `tmp' and appends each array element in
608 608
  * 	  a new llist.
609
- * 	- the head of the new llist is returned.
609
+ * 	- the head of the new llist is assigned to _new_head
610 610
  */
611
-#define clist_qsort(_head, _counter, _cmp_func)				\
611
+#define clist_qsort(_new_head, _head, _counter, _cmp_func)		\
612 612
 ({									\
613 613
 	l_list *_hcq=(l_list *)(_head), *_ncq, *_hecq, *_tcq;		\
614 614
 	int _icq=0, _ccq;						\
@@ -629,7 +629,7 @@ do{                  							\
629 629
 	for(_icq=0; _icq<_ccq; _icq++)					\
630 630
 		_tcq=(l_list *)list_append(0, _tcq, _tmp_list[_icq]);	\
631 631
 									\
632
-	(typeof((_head)))_hecq;						\
632
+	_new_head = (typeof((_head)))_hecq;						\
633 633
 })									\
634 634
 
635 635
 #endif /*LLIST_C*/

Loading…
Annulla
Salva