Re: [iptables PATCH] list: fix prefetch dummy

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

 



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);

will not. Even less so with

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

[that looks so obscure that even I need to go figure out why that is
even permitted at this point].
--
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