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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Jan 2009 17:06:15 -0800
From:	David Brownell <david-b@...bell.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	broonie@...nsource.wolfsonmicro.com, lrg@...mlogic.co.uk,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 2.6.29-rc] regulator: minor cleanup of virtual consumer

On Thursday 15 January 2009, Andrew Morton wrote:
> > -	else if (strncmp(buf, "standby", strlen("standby")) == 0)
> > +	else if (sysfs_streq(buf, "standby\n") == 0)
> >  		mode = REGULATOR_MODE_STANDBY;
> 
> we don't need the \n's, do we?

No, but ...

That's what saves an extra couple dozen bytes of
memory ... the strings, with newlines, are used
to *write* these sysfs attributes.

- Dave



--
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