[parisc-linux] Unregister driver patch
Matthew Wilcox
matthew@wil.cx
Mon, 26 Feb 2001 16:38:33 +0000
On Sun, Feb 25, 2001 at 08:30:55PM -0800, Grant Grundler wrote:
> > - if (device->managed) continue;
> > + if ((int)device->driver) continue;
>
> I'll change this to:
> if (NULL != device->driver) continue;
we definitely don't want to cast this to an int. But what's wrong with
if (device->driver)
continue;
it reads properly `if device has driver then continue'. Sure, it's complex
to think about if you try and puzzle it out `so, if i've assigned a value to
driver then it's not 0, so this is true in which case continue', but if you
just read it, it says what it means.
--
Revolutions do not require corporate support.