Compare pointer with NULL instead of using them as a condition.

This commit is contained in:
augustss 2001-10-26 17:53:59 +00:00
parent 9f786f908f
commit dc901ef1f3
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhub.c,v 1.51 2001/10/24 15:30:17 augustss Exp $ */ /* $NetBSD: uhub.c,v 1.52 2001/10/26 17:53:59 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/* /*
@ -371,8 +371,14 @@ uhub_explore(usbd_device_handle dev)
DPRINTFN(3,("uhub_explore: port=%d !C_CONNECT_" DPRINTFN(3,("uhub_explore: port=%d !C_CONNECT_"
"STATUS\n", port)); "STATUS\n", port));
/* No status change, just do recursive explore. */ /* No status change, just do recursive explore. */
if (up->device && up->device->hub) if (up->device != NULL && up->device->hub != NULL)
up->device->hub->explore(up->device); up->device->hub->explore(up->device);
#if 0 && defined(DIAGNOSTIC)
if (up->device == NULL &&
(status & UPS_CURRENT_CONNECT_STATUS))
printf("%s: connected, no device\n",
USBDEVNAME(sc->sc_dev));
#endif
continue; continue;
} }