svn commit: r348286 - in head/sys/dev: ctau cxgbe
Alexey Dokuchaev
danfe at freebsd.org
Sun May 26 15:17:12 UTC 2019
On Sun, May 26, 2019 at 07:05:20AM -0700, Enji Cooper wrote:
> > On May 26, 2019, at 05:41, Alexey Dokuchaev <danfe at freebsd.org> wrote:
> > 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.
> >
> > ...
> > 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.
Perhaps. I'm currently doing some PVS Studio runs over our kernel
and these were just some low-hanging fruit I wanted to fix. Several
others had been forwarded to commit authors, and some already fixed.
./danfe
More information about the svn-src-head
mailing list