Project

General

Profile

Actions

Bug #2993

closed

sys/dev/raid/mfi/mfi_tbolt.c:1159: bad expression ?

Added by dcb over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/28/2017
Due date:
% Done:

0%

Estimated time:

Description

sys/dev/raid/mfi/mfi_tbolt.c:1159]: (warning) Logical disjunction always evaluates to true: EXPR != 40 || EXPR != 42.

Source code is

if (cdb[0] != 0x28 || cdb[0] != 0x2A) {

Maybe better code

if (cdb[0] != 0x28 && cdb[0] != 0x2A) {
Actions #1

Updated by dillon over 7 years ago

This bug exists in FreeBSD too it seems. I don't know the correct logic right-offhand.

-Matt

Actions #2

Updated by swildner over 7 years ago

Yes, I reported it some years ago to FreeBSD.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187831

Actions #3

Updated by swildner over 7 years ago

  • Status changed from New to Closed

Closing this one.

The bug has been filed in FreeBSD's tracker for some time and the proposed fix isn't correct (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187831). I don't know the underlying issue well enough. When FreeBSD commits a better fix, we'll follow suit.

Actions

Also available in: Atom PDF