> IOW, do ; while(0) / do { } while (0) is not a proper way to do a macro > that imitates a function returning void. > > Objections? None from me, although the ternary ? : is a pretty odd way to write if (blah) do_this_void_function(); else do_that_void_function(); so I'm in favor of that half of the patch anyway. It's my fault for not noticing that part of the patch in the first place. Changing the non-void ? : constructions is just churn, but there's no sense changing it again now that the patch is merged. - R. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- From: Ben Collins <ben.collins@ubuntu.com>
- Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- References:
- [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- From: Ben Collins <ben.collins@ubuntu.com>
- Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- From: Al Viro <viro@ftp.linux.org.uk>
- Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- From: Al Viro <viro@ftp.linux.org.uk>
- [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- Prev by Date: [PATCH] sound: Fix last two instances of "kcalloc(1,...)" -> "kzalloc()"
- Next by Date: [take28 7/8] kevent: Signal notifications.
- Previous by thread: Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- Next by thread: Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
- Index(es):
![]() |