diff options
| author | scw <scw@NetBSD.org> | 2006-04-11 23:07:22 +0000 |
|---|---|---|
| committer | scw <scw@NetBSD.org> | 2006-04-11 23:07:22 +0000 |
| commit | 6bf84bea062a3a487f35e5185ddf6207c55fb718 (patch) | |
| tree | cbb67696be729dc3cfdf54ce3c462e7417f62d37 /sys/dev/usb | |
| parent | 2ed85162e664bd15bcfc68d1c07f872d8096c0e1 (diff) | |
Apply the correct fix for Coverity CID 2862.
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/utoppy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/usb/utoppy.c b/sys/dev/usb/utoppy.c index 4f2c1166051..5cc8b30adc9 100644 --- a/sys/dev/usb/utoppy.c +++ b/sys/dev/usb/utoppy.c @@ -1,4 +1,4 @@ -/* $NetBSD: utoppy.c,v 1.3 2006/04/11 14:08:51 christos Exp $ */ +/* $NetBSD: utoppy.c,v 1.4 2006/04/11 23:07:22 scw Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: utoppy.c,v 1.3 2006/04/11 14:08:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: utoppy.c,v 1.4 2006/04/11 23:07:22 scw Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -648,7 +648,7 @@ utoppy_recv_packet(struct utoppy_softc *sc, uint16_t *respp, uint32_t timeout) struct utoppy_header *h; usbd_status err; uint32_t len, thislen, requested, bytesleft; - uint16_t crc = 0; + uint16_t crc; uint8_t *data, *e, t1, t2; data = sc->sc_in_data; @@ -720,8 +720,8 @@ utoppy_recv_packet(struct utoppy_softc *sc, uint16_t *respp, uint32_t timeout) } /* The command word is part of the CRC */ - crc = UTOPPY_CRC16(crc, h->h_cmd2 >> 8); - crc = UTOPPY_CRC16(0, h->h_cmd2); + crc = UTOPPY_CRC16(0, h->h_cmd2 >> 8); + crc = UTOPPY_CRC16(crc, h->h_cmd2); crc = UTOPPY_CRC16(crc, h->h_cmd >> 8); crc = UTOPPY_CRC16(crc, h->h_cmd); |
