Bug 218041

Summary: sys/dev/e1000/if_em.c: PVS-Studio: V646: possible 'else' keyword missing
Product: Base System Reporter: Svyatoslav <razmyslov>
Component: kernAssignee: Sean Bruno <sbruno>
Status: Closed FIXED    
Severity: Affects Many People CC: sbruno
Priority: --- Keywords: IntelNetworking, patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
git patch none

Description Svyatoslav 2017-03-23 13:00:57 UTC
Created attachment 181102 [details]
git patch

We have found and fixed a bug 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: V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing. if_em.c 1944
Comment 1 commit-hook freebsd_committer 2017-03-24 14:26:32 UTC
A commit references this bug:

Author: sbruno
Date: Fri Mar 24 14:25:56 UTC 2017
New revision: 315903
URL: https://svnweb.freebsd.org/changeset/base/315903

Log:
  Add missing 'else' to 3-state conditional during setup of interrupts.

  We don't want to overwrite the 82574 interrupt setup with a different
  configuration.

  PR:		218041
  Submitted by:	razmyslov@viva64.com

Changes:
  head/sys/dev/e1000/if_em.c
Comment 2 Sean Bruno freebsd_committer 2017-03-24 14:28:11 UTC
Thanks for spending the time to put together this bug.