scrpits: Remove unneeded assignment parentheses
Subsystems (2)
PATCH 1/1 scrpits: Remove unneeded assignment parentheses
Remove unneeded assignment parentheses.
Signed-off-by Xu Wang <[email protected]>
--- scripts/extract-cert.c | 2 +- scripts/sign-file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
scripts/extract-cert.c +1 -1
@@ -61,7 +61,7 @@ static void drain_openssl_errors(void)#define ERR (cond, fmt, ...) \ do { \ - bool __cond = (cond); \ + bool __cond = cond; \ display_openssl_errors(__LINE__); \ if (__cond) { \ err(1, fmt, ## __VA_ARGS__); \
scripts/sign-file.c +1 -1
@@ -104,7 +104,7 @@ static void drain_openssl_errors(void)#define ERR (cond, fmt, ...) \ do { \ - bool __cond = (cond); \ + bool __cond = cond; \ display_openssl_errors(__LINE__); \ if (__cond) { \ err(1, fmt, ## __VA_ARGS__); \
Signature · 1 line
2.17.1
Quoted 1 line · Xu Wang
Remove unneeded assignment parentheses.
I really don't think this is a good idea. Best practice for macros is to parenthesize every argument even if there are technically some cases where it's unnecessary because the problems in the majority cases are huge and unexpected.
James
Quoted 32 lines
Signed-off-by Xu Wang <[email protected]>--- scripts/extract-cert.c | 2 +- scripts/sign-file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)scripts/extract-cert.c +1
-1@@ -61,7 +61,7 @@ static void drain_openssl_errors(void)#define ERR (cond, fmt, ...) \ do { \ - bool __cond = (cond); \ + bool __cond = cond; \ display_openssl_errors(__LINE__); \ if (__cond) { \ err(1, fmt, ## __VA_ARGS__); \scripts/sign-file.c +1
-1@@ -104,7 +104,7 @@ static void drain_openssl_errors(void)#define ERR (cond, fmt, ...) \ do { \ - bool __cond = (cond); \ + bool __cond = cond; \ display_openssl_errors(__LINE__); \ if (__cond) { \ err(1, fmt, ## __VA_ARGS__); \
David Howells
maintainerQuoted 6 lines · James Bottomley
Quoted 1 line
Remove unneeded assignment parentheses.
I really don't think this is a good idea. Best practice for macros is to parenthesize every argument even if there are technically some cases where it's unnecessary because the problems in the majority cases are huge and unexpected.
Yep.
David