Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Use NULL not 0 for pointer comparison
details: https://anonhg.NetBSD.org/src/rev/19faa08b3224
branches: nick-nhusb
changeset: 334206:19faa08b3224
user: skrll <skrll%NetBSD.org@localhost>
date: Sat May 09 09:35:20 2015 +0000
description:
Use NULL not 0 for pointer comparison
diffstat:
sys/dev/usb/uaudio.c | 6 +++---
sys/dev/usb/ugen.c | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 78bafeef48b5 -r 19faa08b3224 sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c Tue Apr 28 06:55:26 2015 +0000
+++ b/sys/dev/usb/uaudio.c Sat May 09 09:35:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaudio.c,v 1.140.2.8 2015/04/06 15:18:13 skrll Exp $ */
+/* $NetBSD: uaudio.c,v 1.140.2.9 2015/05/09 09:35:20 skrll Exp $ */
/*
* Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.140.2.8 2015/04/06 15:18:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.140.2.9 2015/05/09 09:35:20 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -2751,7 +2751,7 @@
size = (ch->bytes_per_frame + ch->sample_size) * UAUDIO_NFRAMES;
for (i = 0; i < UAUDIO_NCHANBUFS; i++) {
xfer = usbd_alloc_xfer(sc->sc_udev);
- if (xfer == 0)
+ if (xfer == NULL)
goto bad;
ch->chanbufs[i].xfer = xfer;
tbuf = usbd_alloc_buffer(xfer, size);
diff -r 78bafeef48b5 -r 19faa08b3224 sys/dev/usb/ugen.c
--- a/sys/dev/usb/ugen.c Tue Apr 28 06:55:26 2015 +0000
+++ b/sys/dev/usb/ugen.c Sat May 09 09:35:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ugen.c,v 1.126.2.8 2015/03/21 11:33:37 skrll Exp $ */
+/* $NetBSD: ugen.c,v 1.126.2.9 2015/05/09 09:35:20 skrll Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.126.2.8 2015/03/21 11:33:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.126.2.9 2015/05/09 09:35:20 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -464,7 +464,7 @@
for(i = 0; i < UGEN_NISOREQS; ++i) {
sce->isoreqs[i].sce = sce;
xfer = usbd_alloc_xfer(sc->sc_udev);
- if (xfer == 0)
+ if (xfer == NULL)
goto bad;
sce->isoreqs[i].xfer = xfer;
tbuf = usbd_alloc_buffer
@@ -720,7 +720,7 @@
break;
}
xfer = usbd_alloc_xfer(sc->sc_udev);
- if (xfer == 0)
+ if (xfer == NULL)
return ENOMEM;
while ((n = min(UGEN_BBSIZE, uio->uio_resid)) != 0) {
DPRINTFN(1, ("ugenread: start transfer %d bytes\n",n));
@@ -934,7 +934,7 @@
break;
}
xfer = usbd_alloc_xfer(sc->sc_udev);
- if (xfer == 0)
+ if (xfer == NULL)
return EIO;
while ((n = min(UGEN_BBSIZE, uio->uio_resid)) != 0) {
error = uiomove(sc->sc_buffer, n, uio);
@@ -957,7 +957,7 @@
break;
case UE_INTERRUPT:
xfer = usbd_alloc_xfer(sc->sc_udev);
- if (xfer == 0)
+ if (xfer == NULL)
return EIO;
while ((n = min(UGETW(sce->edesc->wMaxPacketSize),
uio->uio_resid)) != 0) {
Home |
Main Index |
Thread Index |
Old Index