In article <[email protected]>,
Matthew Dillon <[email protected]> wrote:
> Is this parenthesization correct ?
>
> OLD
>
> #define btokup(addr) (&kmemusage[(caddr_t)(addr) - kmembase >> PAGE_SHIFT])
>
> NEW
>
> #define btokup(addr) (&kmemusage[((caddr_t)(addr) - kmembase) >>
> PAGE_SHIFT])
The added parentheses don't make any difference, semantically. This
change probably wouldn't meet the criteria spelled out in style(9):
Unary operators don't require spaces, binary operators do. Don't use
parentheses unless they're required for precedence, or the statement is
really confusing without them.
a = b->c[0] + ~d == (e || f) || g && h ? i : j >> 1;
k = !(l & FLAGS);
John
--
John Polstra [email protected]
John D. Polstra & Co., Inc. Seattle, Washington USA
"Nobody ever went broke underestimating the taste of the American public."
-- H. L. Mencken
To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-current" in the body of the message