Thread (45 messages) flat view 45 messages, 7 authors, 2012-07-03

Re: [PATCH net-next 09/10] net/mlx4_en: Manage flow steering rules with ethtool

From: Andreas Schwab <hidden>
Date: 2012-07-02 11:35:58

"David Laight" [off-list ref] writes:
 
quoted
quoted
Or write it as (!field || !(typeof(field))~field) which more closely
resembles what the macro name expresses.
Better still, or maybe:

	field == 0 || field == (typeof field)~0
Which doesn't work when sizeof(field) > sizeof(int).
Needs another cast.

	field == 0 || field == (typeof field)~(typeof field)0
You can avoid that by using (typeof field)-1.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help