Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2018 20:01:36 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r340511 - stable/12/sys/kern
Message-ID:  <201811172001.wAHK1aR7047919@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Nov 17 20:01:35 2018
New Revision: 340511
URL: https://svnweb.freebsd.org/changeset/base/340511

Log:
  MFC r339731:
  Add FALLTHROUGH comments to appease Coverity.

Modified:
  stable/12/sys/kern/kern_environment.c
  stable/12/sys/kern/vfs_mount.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_environment.c
==============================================================================
--- stable/12/sys/kern/kern_environment.c	Sat Nov 17 20:00:10 2018	(r340510)
+++ stable/12/sys/kern/kern_environment.c	Sat Nov 17 20:01:35 2018	(r340511)
@@ -839,10 +839,13 @@ getenv_quad(const char *name, quad_t *data)
 	switch (vtp[0]) {
 	case 't': case 'T':
 		iv *= 1024;
+		/* FALLTHROUGH */
 	case 'g': case 'G':
 		iv *= 1024;
+		/* FALLTHROUGH */
 	case 'm': case 'M':
 		iv *= 1024;
+		/* FALLTHROUGH */
 	case 'k': case 'K':
 		iv *= 1024;
 	case '\0':

Modified: stable/12/sys/kern/vfs_mount.c
==============================================================================
--- stable/12/sys/kern/vfs_mount.c	Sat Nov 17 20:00:10 2018	(r340510)
+++ stable/12/sys/kern/vfs_mount.c	Sat Nov 17 20:01:35 2018	(r340511)
@@ -1643,17 +1643,16 @@ vfs_getopt_size(struct vfsoptlist *opts, const char *n
 	if (iv < 0)
 		return (EINVAL);
 	switch (vtp[0]) {
-	case 't':
-	case 'T':
+	case 't': case 'T':
 		iv *= 1024;
-	case 'g':
-	case 'G':
+		/* FALLTHROUGH */
+	case 'g': case 'G':
 		iv *= 1024;
-	case 'm':
-	case 'M':
+		/* FALLTHROUGH */
+	case 'm': case 'M':
 		iv *= 1024;
-	case 'k':
-	case 'K':
+		/* FALLTHROUGH */
+	case 'k': case 'K':
 		iv *= 1024;
 	case '\0':
 		break;



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