RE: [PATCH] [JFFS2] Fix csize integer overflow issue due to truncation

Victor Gallardo
2009-09-20T13:41:03Z

Hi David,

> > Overall the patch looks good to me, except this line.
> >
> > > +#define tn_overlapped(tn) (!!(((tn)->__csize) & TN_OVERLAP))
> >
> > Should just be this.
> >
> > #define tn_overlapped(tn) ((tn)->__csize) & TN_OVERLAP)
>
> You object to the !! ?
>
> That was intentional. Sometimes we print the value of tn_overlapped(),
> and I wanted it to be 1, not a huge number.

Sorry about that. Yes, you are 100% correct.

I'll try to patch on Monday.

Best Regards,

Victor Gallardo