[PATCH] [JFFS2] Fix csize integer overflow issue due to truncation
David Woodhouse
dwmw2 at infradead.org
Sun Sep 20 08:33:42 EDT 2009
On Sat, 2009-09-19 at 22:57 -0700, Victor Gallardo wrote:
> Hi David,
>
> I don't have access to a system till Monday. I'll give it a try then.
Thanks.
> 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.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse at intel.com Intel Corporation
More information about the linux-mtd
mailing list