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

David Woodhouse
2009-09-20T12:33:42Z

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@intel.com Intel Corporation