[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161208072916.GC11966@kuha.fi.intel.com>
Date: Thu, 8 Dec 2016 09:29:16 +0200
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Oliver Neukum <oneukum@...e.com>, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: Re: [PATCHv13,1/3] lib/string: add sysfs_match_string helper
On Wed, Dec 07, 2016 at 03:54:45PM -0800, Guenter Roeck wrote:
> > +int __sysfs_match_string(const char * const *array, size_t n, const char *str)
> > +{
> > + const char *item;
> > + int index;
> > +
> > + for (index = 0; index < n; index++) {
> > + item = array[index];
> > + if (!item)
> > + break;
> > + if (!sysfs_streq(item, str))
>
> No idea how this slipped in: sysfs_streq() returns true on a match,
> meaning the "!" here is wrong.
Good catch. Thanks Guenter.
--
heikki
Powered by blists - more mailing lists