Browse Source

cmd: mtdparts: add fallthrough in switch statement

Switch blocks for deriving size naturally use fallthrough between
'case' statements. Make it explicit.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal 6 năm trước cách đây
mục cha
commit
2b9ace5527
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      cmd/mtdparts.c

+ 3 - 0
cmd/mtdparts.c

@@ -177,13 +177,16 @@ static u64 memsize_parse (const char *const ptr, const char **retptr)
 		case 'G':
 		case 'g':
 			ret <<= 10;
+			/* Fallthrough */
 		case 'M':
 		case 'm':
 			ret <<= 10;
+			/* Fallthrough */
 		case 'K':
 		case 'k':
 			ret <<= 10;
 			(*retptr)++;
+			/* Fallthrough */
 		default:
 			break;
 	}