NetBSD Problem Report #51574
From www@NetBSD.org Mon Oct 24 16:04:53 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 023387A1AE
for <gnats-bugs@gnats.NetBSD.org>; Mon, 24 Oct 2016 16:04:53 +0000 (UTC)
Message-Id: <20161024160451.E0FAA7A2BE@mollari.NetBSD.org>
Date: Mon, 24 Oct 2016 16:04:51 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/dev/usb/uhso.c:2167: confusing logic ?
X-Send-Pr-Version: www-1.0
>Number: 51574
>Category: kern
>Synopsis: src/sys/dev/usb/uhso.c:2167: confusing logic ?
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: skrll
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 24 16:05:00 +0000 2016
>Closed-Date: Mon Oct 31 12:43:49 +0000 2016
>Last-Modified: Mon Oct 31 12:43:49 +0000 2016
>Originator: David Binderman
>Release: cvs-20161024
>Organization:
>Environment:
>Description:
src/sys/dev/usb/uhso.c:2167]: (style) Expression is always false because 'else if' condition matches previous condition at line 2152.
Source code is
if (got < want) {
..
} else if (want > got) {
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/51574: src/sys/dev/usb/uhso.c:2167: confusing logic ?
Date: Mon, 31 Oct 2016 05:16:02 +0000
On Mon, Oct 24, 2016 at 04:05:00PM +0000, dcb314@hotmail.com wrote:
> src/sys/dev/usb/uhso.c:2167]: (style) Expression is always false because 'else if' condition matches previous condition at line 2152.
>
> Source code is
>
> if (got < want) {
> ..
> } else if (want > got) {
That's obviously wrong, but it's not at all clear to me what should be
there instead.
Anyone who knows more than I do about the hardware want to comment?
--
David A. Holland
dholland@netbsd.org
Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Mon, 31 Oct 2016 08:14:40 +0000
Responsible-Changed-Why:
Take (mostly because I'm playing in usb land)
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51574 CVS commit: src/sys/dev/usb
Date: Mon, 31 Oct 2016 08:18:11 -0400
Module Name: src
Committed By: christos
Date: Mon Oct 31 12:18:10 UTC 2016
Modified Files:
src/sys/dev/usb: uhso.c
Log Message:
PR/51574: You can't always get what you want, but if you try sometime..
Remove unreachable code.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/uhso.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Mon, 31 Oct 2016 12:43:49 +0000
State-Changed-Why:
Christos fixed it
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.