Re: [RFC PATCH 3/4] selftests/binderfs: Macro argument 'fd' may be better as '(fd)' to avoid precedence issues

2024-05-15 Thread Bill Wendling
On Tue, May 14, 2024 at 6:08 PM Abhinav Saxena wrote: > > Change the macro argument 'fd' to '(fd)' to avoid potential precedence > issues. Without parentheses, the macro expansion could lead to > unexpected behavior when used with an expression having different > precedence levels. > > Example Cod

[RFC PATCH 3/4] selftests/binderfs: Macro argument 'fd' may be better as '(fd)' to avoid precedence issues

2024-05-14 Thread Abhinav Saxena
Change the macro argument 'fd' to '(fd)' to avoid potential precedence issues. Without parentheses, the macro expansion could lead to unexpected behavior when used with an expression having different precedence levels. Example Code: #define CALC_SQR_BAD(x) (x*x) #define CALC_SQR_GOOD(x) (