diff --git a/src/utils/checksum.c b/src/utils/checksum.c index da5c8df..0b325f3 100644 --- a/src/utils/checksum.c +++ b/src/utils/checksum.c @@ -1,6 +1,7 @@ #include #include + /* Forward Declarations */ static inline uint16_t read_be16(const uint8_t *ptr); static uint32_t sum_words(const uint8_t *data, size_t len); @@ -32,10 +33,10 @@ sum_words(const uint8_t *data, size_t len) { size_t n = (words + 3) >> 2; switch (words & 3) { - case 0: do { sum += read_be16(ptr); ptr += 2; - case 3: sum += read_be16(ptr); ptr += 2; - case 2: sum += read_be16(ptr); ptr += 2; - case 1: sum += read_be16(ptr); ptr += 2; + case 0: do { sum += read_be16(ptr); ptr += 2; /* fall through */ + case 3: sum += read_be16(ptr); ptr += 2; /* fall through */ + case 2: sum += read_be16(ptr); ptr += 2; /* fall through */ + case 1: sum += read_be16(ptr); ptr += 2; /* fall through */ } while (--n > 0); } }