From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2qEg-00079U-2E for qemu-devel@nongnu.org; Wed, 19 Nov 2008 11:49:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2qEe-00078c-4F for qemu-devel@nongnu.org; Wed, 19 Nov 2008 11:49:01 -0500 Received: from [199.232.76.173] (port=57877 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2qEe-00078V-0O for qemu-devel@nongnu.org; Wed, 19 Nov 2008 11:49:00 -0500 Received: from gv-out-0910.google.com ([216.239.58.186]:52249) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2qEd-00074m-MI for qemu-devel@nongnu.org; Wed, 19 Nov 2008 11:48:59 -0500 Received: by gv-out-0910.google.com with SMTP id n8so25605gve.36 for ; Wed, 19 Nov 2008 08:48:58 -0800 (PST) Message-ID: <49244376.7020009@codemonkey.ws> Date: Wed, 19 Nov 2008 10:48:54 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 1/2] Add TAILQ_FOREACH_SAFE References: <20081119134857.26075.2417.stgit@mchn012c.ww002.siemens.net> <20081119134857.26075.9428.stgit@mchn012c.ww002.siemens.net> <492429F3.3010202@codemonkey.ws> <492435B9.3010106@siemens.com> In-Reply-To: <492435B9.3010106@siemens.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jan Kiszka wrote: > Won't fly, next_var can become NULL and would be dereferenced without a > prior check. Unless I'm totally blind now, there is no > TAILQ_FOREACH_SAFE without "GCC-ism" Wouldn't: (var) ? ({ (next_var) = ((var)->field.tqe_next); 1;}) :0; Be equivalent to: (var) ? ((next_var = ((var)->field.tqe_next), var) : var Regards, Anthony Liguori