From owner-svn-src-all@freebsd.org Sun May 26 15:17:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2AB315A9342; Sun, 26 May 2019 15:17:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4674D8A90A; Sun, 26 May 2019 15:17:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 1981AAA4B; Sun, 26 May 2019 15:17:12 +0000 (UTC) Date: Sun, 26 May 2019 15:17:12 +0000 From: Alexey Dokuchaev To: Enji Cooper 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> References: <201905261241.x4QCf3ng086605@repo.freebsd.org> <2BE2FA91-38D0-4730-8A6A-BAF5037EB24E@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2BE2FA91-38D0-4730-8A6A-BAF5037EB24E@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 4674D8A90A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.925,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2019 15:17:12 -0000 On Sun, May 26, 2019 at 07:05:20AM -0700, Enji Cooper wrote: > > On May 26, 2019, at 05:41, Alexey Dokuchaev 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