[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Crash-utility] [PATCH] Remove the VOID_PTR facilitator macro




----- Original Message -----
> Hi Dave,
> >
> > BTW, was there a reason that you changed this?:
> >
> >                  if (si->c_flags & SLAB_CFLGS_BUFCTL)
> > - obj = si->s_mem + ((next - si->s_index) * si->c_offset);
> > + obj = si->s_mem + (next - si->s_index) * si->c_offset;
> 
> It wasn't my patch so I'm only offering my ACK for the original change
> and my reason is that multiply has higher operator precedence than add
> (and subtract) in normal arithmetic so the outer parentheses were
> never necessary anyway. They didn't create an error but they weren't
> needed either. The inner parentheses are required.
> 
> --
> David Mair.

Right I understand that, but the sources are full of such 
"extra" parentheses, some to prevent compiler warnings, but
mostly just for ease of maintainability/understanding.

I just was wondering why that line was explicitly changed. 

Dave


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]