mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-28 04:03:21 -04:00
Merge pull request #6434 from hexagonrecursion/1-1-fallthrough
1.1: Make switch fallthrough explicit
This commit is contained in:
commit
d539f4c1ce
3 changed files with 4 additions and 4 deletions
|
|
@ -363,8 +363,8 @@ crc32_clmul(const uint8_t *src, long len, uint32_t initial_crc)
|
|||
*/
|
||||
uint32_t crc = ~initial_crc;
|
||||
switch (len) {
|
||||
case 3: crc = (crc >> 8) ^ Crc32Lookup[0][(crc & 0xFF) ^ *src++];
|
||||
case 2: crc = (crc >> 8) ^ Crc32Lookup[0][(crc & 0xFF) ^ *src++];
|
||||
case 3: crc = (crc >> 8) ^ Crc32Lookup[0][(crc & 0xFF) ^ *src++]; // fallthrough
|
||||
case 2: crc = (crc >> 8) ^ Crc32Lookup[0][(crc & 0xFF) ^ *src++]; // fallthrough
|
||||
case 1: crc = (crc >> 8) ^ Crc32Lookup[0][(crc & 0xFF) ^ *src++];
|
||||
}
|
||||
return ~crc;
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ static inline int unpack_execute(unpack_context* ctx, const char* data, Py_ssize
|
|||
|
||||
|
||||
_fixed_trail_again:
|
||||
++p;
|
||||
++p; // fallthrough
|
||||
|
||||
default:
|
||||
if((size_t)(pe - p) < trail) { goto _out; }
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ static inline int unpack_execute(unpack_context* ctx, const char* data, size_t l
|
|||
|
||||
|
||||
_fixed_trail_again:
|
||||
++p;
|
||||
++p; // fallthrough
|
||||
|
||||
default:
|
||||
if((size_t)(pe - p) < trail) { goto _out; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue