Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Recode to remove bogus initializer.
details: https://anonhg.NetBSD.org/src/rev/5f26d15d6104
branches: trunk
changeset: 554505:5f26d15d6104
user: mycroft <mycroft%NetBSD.org@localhost>
date: Wed Oct 29 01:21:38 2003 +0000
description:
Recode to remove bogus initializer.
diffstat:
sys/dev/ic/cy.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (45 lines):
diff -r 17cb26fc2327 -r 5f26d15d6104 sys/dev/ic/cy.c
--- a/sys/dev/ic/cy.c Wed Oct 29 01:12:23 2003 +0000
+++ b/sys/dev/ic/cy.c Wed Oct 29 01:21:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cy.c,v 1.33 2003/10/25 18:35:42 christos Exp $ */
+/* $NetBSD: cy.c,v 1.34 2003/10/29 01:21:38 mycroft Exp $ */
/*
* cy.c
@@ -16,7 +16,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.33 2003/10/25 18:35:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.34 2003/10/29 01:21:38 mycroft Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -247,8 +247,8 @@
static struct cy_port *
cy_getport(dev_t dev)
{
- int i, j, k = 0, u = minor(dev) & ~CYDIALOUT_MASK;
- struct cy_softc *sc = NULL;
+ int i, j, k, u = minor(dev) & ~CYDIALOUT_MASK;
+ struct cy_softc *sc;
for (i = 0, j = 0; i < cy_cd.cd_ndevs; i++) {
k = j;
@@ -259,13 +259,10 @@
continue;
j += sc->sc_nchannels;
if (j > u)
- break;
+ return (&sc->sc_ports[u - k]);
}
- if (i == cy_cd.cd_ndevs)
- return (NULL);
- else
- return (&sc->sc_ports[u - k]);
+ return (NULL);
}
/*
Home |
Main Index |
Thread Index |
Old Index