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

Alexey Dokuchaev danfe at FreeBSD.org
Sun May 26 12:41:04 UTC 2019


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);
 	}
 


More information about the svn-src-all mailing list