Re: [iptables PATCH] list: fix prefetch dummy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/07/2015 11:17 AM, Jan Engelhardt wrote:

On Tuesday 2015-04-07 19:45, Alexander Duyck wrote:
  -#define prefetch(x)		1
+#define prefetch(x)		((void)0)

Why not just use "do {} while (0)"?  I know that is what is used in the
kernel for functions that don't do anything.
I may be getting the terms wrong, but:
do{}while(0) is not an expression, it is a (block) control statement.
In particular, do{}while(0) won't evaluate to an rvalue.

Right.  That is the point in this case.  I am assuming what Arturo is trying to
accomplish since you shouldn't be able to evaluate ((void)0) as an rvalue
either.

The difference is that

	int i;
	i = 1, (void)0;

compiles, while

	i = 1, do{}while(0);


Okay, that explains it. It is being used inside the init, condition, and post process sections of a for loop. Thanks for explaining it.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux