Bug 217746

Summary: sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)
Product: Base System Reporter: Svyatoslav <razmyslov>
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: Closed FIXED    
Severity: Affects Many People CC: np
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
git patch none

Description Svyatoslav 2017-03-13 12:03:40 UTC
Created attachment 180769 [details]
git patch

We have found and fixed a vulnerability using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warning: V560 A part of conditional expression is always true: 0x7dac. t4_main.c 8001
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-03-13 17:17:30 UTC
A commit references this bug:

Author: np
Date: Mon Mar 13 17:16:29 UTC 2017
New revision: 315201
URL: https://svnweb.freebsd.org/changeset/base/315201

Log:
  cxgbe(4):  Fix an always-true assertion (reported by PVS-Studio).

  sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)

  PR:		217746
  Submitted by:	Svyatoslav (razmyslov at viva64 com)
  MFC after:	1 week

Changes:
  head/sys/dev/cxgbe/t4_main.c