From 93eb6f1095a28bd7507c832f1a0925c4f54bb46c Mon Sep 17 00:00:00 2001 From: Josef Karthauser Date: Sun, 7 Apr 2002 10:31:39 +0000 Subject: [PATCH] MFNetBSD: revision 1.52 date: 2001/10/26 17:53:59; author: augustss; state: Exp; lines: +8 -2 Compare pointer with NULL instead of using them as a condition. --- sys/dev/usb/uhub.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 3b7fcf416d19..8234ba16f21e 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$ */ /* @@ -388,8 +388,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; }