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

Dave Anderson anderson at redhat.com
Thu Jan 27 18:47:41 UTC 2011



----- 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




More information about the Crash-utility mailing list