svn commit: r348286 - in head/sys/dev: ctau cxgbe

Enji Cooper yaneurabeya at gmail.com
Sun May 26 14:05:24 UTC 2019


> On May 26, 2019, at 05:41, Alexey Dokuchaev <danfe at freebsd.org> wrote:
> 
> Author: danfe (ports committer)
> Date: Sun May 26 12:41:03 2019
> New Revision: 348286
> URL: https://svnweb.freebsd.org/changeset/base/348286
> 
> Log:
>  Fix two errors reported by PVS Studio: V646 Consider inspecting the
>  application's logic.  It's possible that 'else' keyword is missing.
> 
>  Reviewed by:    gallatin, np, pfg
>  Approved by:    pfg
>  Differential Revision:    https://reviews.freebsd.org/D20396
> 
> Modified:
>  head/sys/dev/ctau/ctddk.c
>  head/sys/dev/cxgbe/t4_main.c
> 
> Modified: head/sys/dev/ctau/ctddk.c
> ==============================================================================
> --- head/sys/dev/ctau/ctddk.c    Sun May 26 03:52:35 2019    (r348285)
> +++ head/sys/dev/ctau/ctddk.c    Sun May 26 12:41:03 2019    (r348286)
> @@ -237,7 +237,7 @@ int ct_set_clk (ct_chan_t *c, int clk)
>    if (c->mode == M_E1) {
>        ct_setup_e1 (c->board);
>        return 0;
> -    } if (c->mode == M_G703) {
> +    } else if (c->mode == M_G703) {
>        ct_setup_g703 (c->board);
>        return 0;
>    } else

    This seems like a good candidate for a switch-case logical block.
Cheers,
-Enji


More information about the svn-src-all mailing list