NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/50949: src/sys/dev/pcmcia/if_malo_pcmcia.c:637]: (style) Suspicious condition



>Number:         50949
>Category:       kern
>Synopsis:       src/sys/dev/pcmcia/if_malo_pcmcia.c:637]: (style) Suspicious condition
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 11 17:20:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160311
>Organization:
>Environment:
>Description:

src/sys/dev/pcmcia/if_malo_pcmcia.c:637]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.


Source code is

   if ((error = ieee80211_media_change(ifp) != ENETRESET))


Maybe better code

   if ((error = ieee80211_media_change(ifp)) != ENETRESET)


 


   

  



>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index