Messages in this thread | | | Date | Thu, 4 Jun 2015 18:24:26 +0300 | From | Sergei Zviagintsev <> | Subject | Re: [PATCH] kdbus: fix type conversion in item macroses |
| |
Hi,
On Thu, Jun 04, 2015 at 01:26:03PM +0200, David Herrmann wrote: > Hi > > On Thu, Jun 4, 2015 at 12:39 PM, Sergei Zviagintsev <sergei@s15v.net> wrote: > > KDBUS_ITEM_NEXT and KDBUS_ITEMS_END macroses do not enclose _i argument > > into parentheses when applying the cast operator. If complex expression > > passed, e.g. > > > > KDBUS_ITEM_NEXT(condition ? a : b) > > > > then type conversion to (u8 *) will go wrong due to precedence rules. > > > > Use parentheses properly. Update documentation. > > > > Signed-off-by: Sergei Zviagintsev <sergei@s15v.net> > > --- > > Documentation/kdbus/kdbus.item.xml | 2 +- > > ipc/kdbus/item.h | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
It seems that I missed the same issue with KDBUS_ITEMS_SIZE (and samples/kdbus as well, but that would be another patch), so I'd better fix that and merge with updated version of
http://permalink.gmane.org/gmane.linux.kernel/1969533
into single patch.
| |