Messages in this thread | | | Date | Mon, 1 Nov 2010 22:16:40 +0100 (CET) | From | Jesper Juhl <> | Subject | Re: [PATCH 07/29] Staging: yaffs2: yaffs_checkptrw: Add files |
| |
On Mon, 1 Nov 2010, Jesper Juhl wrote:
> On Mon, 1 Nov 2010, Tracey Dent wrote: > [snip] > > > +int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum) > > +{ > > + __u32 composite_sum; > > + composite_sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF); > > + *sum = composite_sum; > > + return 1; > > +} > > Why not > > int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum) > { > *sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF); > return 1; > } >
And by the way, why is this function not returning 'void' so it just becomes:
void yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum) { *sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF); }
Since it's always returning '1' I fail to see the point of the 'int' return value.
-- Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/ Plain text mails only, please http://www.expita.com/nomime.html Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
| |