NetBSD-Bugs archive

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

port-arm/53158: src/sys/arch/arm/sunxi/sunxi_tcon.c:143: suspicious compare ?



>Number:         53158
>Category:       port-arm
>Synopsis:       src/sys/arch/arm/sunxi/sunxi_tcon.c:143: suspicious compare ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 05 18:15:00 +0000 2018
>Originator:     David Binderman
>Release:        cvs-20180405
>Organization:
>Environment:
>Description:
src/sys/arch/arm/sunxi/sunxi_tcon.c:143]: (style) Same expression on both sides of '||'.

Source code is

    if (sc->sc_clk_ahb == NULL || sc->sc_clk_ch0 == NULL
        || sc->sc_clk_ch0 == NULL) {

Maybe better code

    if (sc->sc_clk_ahb == NULL || sc->sc_clk_ch0 == NULL
        || sc->sc_clk_ch1 == NULL) {

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index