[PATCH 15/16] btrfs-progs: annotate fallthroughs in parse_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We intentionally fall through these case statements;
just annotate it to be clear.

Resolves-Coverity-CID: 1054887
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 utils.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/utils.c b/utils.c
index ecacc29..9aeb5f8 100644
--- a/utils.c
+++ b/utils.c
@@ -1499,16 +1499,22 @@ u64 parse_size(char *s)
 		switch (c) {
 		case 'e':
 			mult *= 1024;
+			/* fallthrough */
 		case 'p':
 			mult *= 1024;
+			/* fallthrough */
 		case 't':
 			mult *= 1024;
+			/* fallthrough */
 		case 'g':
 			mult *= 1024;
+			/* fallthrough */
 		case 'm':
 			mult *= 1024;
+			/* fallthrough */
 		case 'k':
 			mult *= 1024;
+			/* fallthrough */
 		case 'b':
 			break;
 		default:
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux