On Mon, 24 Mar 2008 22:39:18 +1100
Paul Mackerras <[EMAIL PROTECTED]> wrote:

> Josh Boyer writes:
> 
> > This adds a function called of_device_is_available that checks the state
> > of the status property of a device.  If the property is absent or set to
> > either "okay" or "ok", it returns 1.  Otherwise it returns 0.
> 
> Well actually...
> 
> > +   if (statlen > 0) {
> > +           if (!strncmp(status, "okay", 4) || !strncmp(status, "ok", 2))
> > +                   return 1;
> 
> The second test will succeed for anything that starts with "ok", so
> the first test is redundant.  I suspect you want strcmp instead of
> strncmp in both tests.

GRR!  That's what I had in the original patch and you told me to use
strncmp instead.

If you want I can send out a v3.  Otherwise, perhaps you could just
munge the patch?

josh
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to