From dc901ef1f39fbec980cc4c1d41b00a69f9fb2f79 Mon Sep 17 00:00:00 2001 From: augustss Date: Fri, 26 Oct 2001 17:53:59 +0000 Subject: Compare pointer with NULL instead of using them as a condition. --- sys/dev/usb/uhub.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 8bf53dc0c88..a12d1f8a127 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -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 $ */ /* @@ -371,8 +371,14 @@ uhub_explore(usbd_device_handle dev) DPRINTFN(3,("uhub_explore: port=%d !C_CONNECT_" "STATUS\n", port)); /* 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); +#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; } -- cgit