lkml.org 
[lkml]   [2015]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2015-06-04 17:41    [W:0.243 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site