Kernel prepatch 3.11-rc4
Kernel prepatch 3.11-rc4
Posted Aug 5, 2013 23:24 UTC (Mon) by xtifr (guest, #143)In reply to: Kernel prepatch 3.11-rc4 by kalvdans
Parent article: Kernel prepatch 3.11-rc4
inline int is_gate_vma(whatever* vma) { return vma = &gate_vma; }
This should get a compile-time error, since it's not returning an int/bool, or at the very least, a stern warning, and possibly another warning, since it only modifies a local variable. (To actually do an assignment, you'd have to pass a pointer to the pointer.)
The macro version, by contrast, will suppress any warning the compiler might issue, because it includes the extra parens that tell gcc this sort of thing is ok--and has to include those extra parens. Macros may be *less* evil in C than in C++, but they're still something I prefer to avoid when I can.
