Messages in this thread | | | From | David Brownell <> | Subject | Re: [patch 2.6.29-rc] regulator: minor cleanup of virtual consumer | Date | Thu, 15 Jan 2009 17:06:15 -0800 |
| |
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
| |