Thread (1 message) 1 message, 1 author, 2007-09-02

Re: [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead

From: rae l <hidden>
Date: 2007-09-02 00:57:14
Also in: lkml

On 9/2/07, David Newall [off-list ref] wrote:
Denis Cheng wrote
quoted
+     order = get_bitmask_order(min(max, (unsigned long)UINT_MAX)) - 1;
Why doesn't this clash with the max define, also in linux/kernel.h?
They indeed don't clash,
the cpp included by gcc is intelligent enough, it know the
function-style definition of max in kernel.h, that's different from
the auto variable max here, so they don't clash with each other,

But I think the variable name "max" here is ambiguous, I changed it to
"limit", see my following patch [PATCH 2/3].

-- 
Denis Cheng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help