lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 1 Nov 2010 22:16:40 +0100 (CET)
From:	Jesper Juhl <jj@...osbits.net>
To:	Tracey Dent <tdent48227@...il.com>
cc:	greg@...ah.com, manningc2@...rix.gen.nz,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
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@...osbits.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ