NetBSD Problem Report #54323

From www@netbsd.org  Mon Jun 24 14:05:03 2019
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 194A87A149
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 24 Jun 2019 14:05:03 +0000 (UTC)
Message-Id: <20190624140502.45DB47A1C4@mollari.NetBSD.org>
Date: Mon, 24 Jun 2019 14:05:02 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/lib/libisns/isns_thread.c:155: bad if ?
X-Send-Pr-Version: www-1.0

>Number:         54323
>Category:       lib
>Synopsis:       src/lib/libisns/isns_thread.c:155: bad if ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 14:10:00 +0000 2019
>Closed-Date:    Thu Jul 04 19:32:25 +0000 2019
>Last-Modified:  Thu Jul 04 19:32:25 +0000 2019
>Originator:     David Binderman
>Release:        cvs 20190624
>Organization:
>Environment:
>Description:
src/lib/libisns/isns_thread.c:155]: (warning) Logical conjunction always evaluates to false: rbytes < 0 && rbytes == sizeof(trans_id).

Source code is

       if ((rbytes < 0) && (rbytes == sizeof(trans_id)))
                                isns_abort_trans(cfg_p, trans_id);

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54323 CVS commit: src/lib/libisns
Date: Wed, 3 Jul 2019 18:40:34 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Wed Jul  3 18:40:33 UTC 2019

 Modified Files:
 	src/lib/libisns: isns_thread.c

 Log Message:
 Fix up mangled logic, hopefully. PR 54323 from David Binderman.

 XXX: This code is pretty dodgy in general and would benefit from a
 XXX: workover by someone who knows what it's supposed to be doing.
 XXX: E.g. it appears that a read error will cause an infinite loop...


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libisns/isns_thread.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: dholland@NetBSD.org
State-Changed-When: Thu, 04 Jul 2019 19:32:25 +0000
State-Changed-Why:
fixed, more or less


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.