Module Name: src Committed By: dyoung Date: Fri Sep 4 16:42:39 UTC 2009
Modified Files: src/sys/dev/usb: uhub.c Log Message: KNF: compare a pointer with NULL instead of evaluating its "truth." To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/dev/usb/uhub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/uhub.c diff -u src/sys/dev/usb/uhub.c:1.105 src/sys/dev/usb/uhub.c:1.106 --- src/sys/dev/usb/uhub.c:1.105 Thu Sep 3 20:54:03 2009 +++ src/sys/dev/usb/uhub.c Fri Sep 4 16:42:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uhub.c,v 1.105 2009/09/03 20:54:03 dyoung Exp $ */ +/* $NetBSD: uhub.c,v 1.106 2009/09/04 16:42:38 dyoung Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ /* @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.105 2009/09/03 20:54:03 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.106 2009/09/04 16:42:38 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -606,7 +606,7 @@ nports = hub->hubdesc.bNbrPorts; for(port = 0; port < nports; port++) { rup = &hub->ports[port]; - if (rup->device) + if (rup->device != NULL) usb_disconnect_port(rup, self); }