From ac151e89b9b3cad0074cd85f01334a3404132082 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Tue, 5 May 2015 15:34:48 +0200 Subject: [PATCH] Fix xbt_fifo_foreach Does not compile on some versions of clang --- include/xbt/fifo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xbt/fifo.h b/include/xbt/fifo.h index c57456bd7e..b817ea9bb5 100644 --- a/include/xbt/fifo.h +++ b/include/xbt/fifo.h @@ -87,7 +87,7 @@ XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_prev_item(xbt_fifo_item_t i); */ #define xbt_fifo_foreach(f,i,n,type) \ for(i=xbt_fifo_get_first_item(f); \ - ((i)?(n=(type)(xbt_fifo_get_item_content(i))):(NULL)); \ + ((i)?(n=(type)(xbt_fifo_get_item_content(i)),1):(0)); \ i=xbt_fifo_get_next_item(i)) /** @} */ -- 2.20.1