NetBSD Problem Report #50818
From www@NetBSD.org Wed Feb 17 10:59:47 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 908F37ABDA
for <gnats-bugs@gnats.NetBSD.org>; Wed, 17 Feb 2016 10:59:47 +0000 (UTC)
Message-Id: <20160217105946.BCE677ACC2@mollari.NetBSD.org>
Date: Wed, 17 Feb 2016 10:59:46 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/dev/pci/if_alc.c:2391: contradictory nested if ?
X-Send-Pr-Version: www-1.0
>Number: 50818
>Category: kern
>Synopsis: src/sys/dev/pci/if_alc.c:2391: contradictory nested if ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 17 11:00:01 +0000 2016
>Closed-Date: Wed Feb 17 20:10:48 +0000 2016
>Last-Modified: Wed Feb 17 20:10:48 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160216
>Organization:
>Environment:
>Description:
[src/sys/dev/pci/if_alc.c:2391] -> [src/sys/dev/pci/if_alc.c:2392]: (warning) Opposite conditions in nested 'if' blocks lead to a dead code block.
Source code is
if (error != 0) {
if (!error) {
bus_dmamap_unload(sc->sc_dmat,
sc->alc_cdata.alc_rx_sparemap);
error = EFBIG;
printf("%s: too many segments?!\n",
device_xname(sc->sc_dev));
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50818 CVS commit: src/sys/dev/pci
Date: Wed, 17 Feb 2016 15:05:46 -0500
Module Name: src
Committed By: christos
Date: Wed Feb 17 20:05:45 UTC 2016
Modified Files:
src/sys/dev/pci: if_alc.c
Log Message:
PR/50818: David Binderman: Delete dead code (copied from if_et.c)
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/if_alc.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: wiz@NetBSD.org
State-Changed-When: Wed, 17 Feb 2016 20:10:48 +0000
State-Changed-Why:
Fixed by christos, thanks.
>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.