Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Use NULL instead of 0 when returning a NULL poin...



details:   https://anonhg.NetBSD.org/src/rev/33e2efa979ce
branches:  trunk
changeset: 787834:33e2efa979ce
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Jul 06 14:38:54 2013 +0000

description:
Use NULL instead of 0 when returning a NULL pointer.
Also, remedy minor whitespace issue.

diffstat:

 sys/dev/usb/usbdi.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 4b78dbea3b13 -r 33e2efa979ce sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Sat Jul 06 12:11:54 2013 +0000
+++ b/sys/dev/usb/usbdi.c       Sat Jul 06 14:38:54 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.152 2013/04/04 13:27:56 skrll Exp $        */
+/*     $NetBSD: usbdi.c,v 1.153 2013/07/06 14:38:54 jakllsch Exp $     */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.152 2013/04/04 13:27:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.153 2013/07/06 14:38:54 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -393,7 +393,7 @@
 usbd_get_buffer(usbd_xfer_handle xfer)
 {
        if (!(xfer->rqflags & URQ_DEV_DMABUF))
-               return (0);
+               return (NULL);
        return (KERNADDR(&xfer->dmabuf, 0));
 }
 
@@ -539,7 +539,7 @@
 usbd_interface2endpoint_descriptor(usbd_interface_handle iface, u_int8_t index)
 {
        if (index >= iface->idesc->bNumEndpoints)
-               return (0);
+               return (NULL);
        return (iface->endpoints[index].edesc);
 }
 
@@ -840,7 +840,7 @@
 
        if (!repeat) {
                /* Remove request from queue. */
-               
+
                KASSERTMSG(!SIMPLEQ_EMPTY(&pipe->queue),
                    "pipe %p is empty, but xfer %p wants to complete", pipe,
                     xfer);
@@ -1180,7 +1180,7 @@
                if (ep->edesc->bEndpointAddress == address)
                        return (iface->endpoints[i].edesc);
        }
-       return (0);
+       return (NULL);
 }
 
 /*



Home | Main Index | Thread Index | Old Index