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

Victor Gallardo vgallardo at amcc.com
Sun Sep 20 09:40:55 EDT 2009


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




More information about the linux-mtd mailing list