Module Name: src Committed By: jakllsch Date: Wed Aug 21 17:59:40 UTC 2013
Modified Files: src/sys/dev/usb: usb.c usb_subr.c Log Message: Use NULL instead of 0 as appropriate. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/sys/dev/usb/usb.c cvs rdiff -u -r1.190 -r1.191 src/sys/dev/usb/usb_subr.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/usb.c diff -u src/sys/dev/usb/usb.c:1.140 src/sys/dev/usb/usb.c:1.141 --- src/sys/dev/usb/usb.c:1.140 Tue Jan 22 12:40:43 2013 +++ src/sys/dev/usb/usb.c Wed Aug 21 17:59:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.140 2013/01/22 12:40:43 jmcneill Exp $ */ +/* $NetBSD: usb.c,v 1.141 2013/08/21 17:59:40 jakllsch Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.140 2013/01/22 12:40:43 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.141 2013/08/21 17:59:40 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -660,7 +660,7 @@ usbioctl(dev_t devt, u_long cmd, void *d if (len < 0 || len > 32768) return (EINVAL); if (addr < 0 || addr >= USB_MAX_DEVICES || - sc->sc_bus->devices[addr] == 0) + sc->sc_bus->devices[addr] == NULL) return (EINVAL); if (len != 0) { iov.iov_base = (void *)ur->ucr_data; Index: src/sys/dev/usb/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.190 src/sys/dev/usb/usb_subr.c:1.191 --- src/sys/dev/usb/usb_subr.c:1.190 Wed Mar 20 11:14:51 2013 +++ src/sys/dev/usb/usb_subr.c Wed Aug 21 17:59:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.190 2013/03/20 11:14:51 skrll Exp $ */ +/* $NetBSD: usb_subr.c,v 1.191 2013/08/21 17:59:40 jakllsch Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.190 2013/03/20 11:14:51 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.191 2013/08/21 17:59:40 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -801,7 +801,7 @@ usbd_getnewaddr(usbd_bus_handle bus) int addr; for (addr = 1; addr < USB_MAX_DEVICES; addr++) - if (bus->devices[addr] == 0) + if (bus->devices[addr] == NULL) return (addr); return (-1); }