Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2019 12:41:03 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348286 - in head/sys/dev: ctau cxgbe
Message-ID:  <201905261241.x4QCf3ng086605@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Sun May 26 03:52:35 2019	(r348285)
+++ head/sys/dev/cxgbe/t4_main.c	Sun May 26 12:41:03 2019	(r348286)
@@ -9709,7 +9709,7 @@ set_offload_policy(struct adapter *sc, struct t4_offlo
 		/* Delete installed policies. */
 		op = NULL;
 		goto set_policy;
-	} if (uop->nrules > 256) { /* arbitrary */
+	} else if (uop->nrules > 256) { /* arbitrary */
 		return (E2BIG);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905261241.x4QCf3ng086605>