Date: Sun, 26 May 2019 15:17:12 +0000 From: Alexey Dokuchaev <danfe@freebsd.org> To: Enji Cooper <yaneurabeya@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, gallatin@freebsd.org Subject: Re: svn commit: r348286 - in head/sys/dev: ctau cxgbe Message-ID: <20190526151712.GA72802@FreeBSD.org> In-Reply-To: <2BE2FA91-38D0-4730-8A6A-BAF5037EB24E@gmail.com> References: <201905261241.x4QCf3ng086605@repo.freebsd.org> <2BE2FA91-38D0-4730-8A6A-BAF5037EB24E@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 26, 2019 at 07:05:20AM -0700, Enji Cooper wrote: > > On May 26, 2019, at 05:41, Alexey Dokuchaev <danfe@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190526151712.GA72802>