summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r--lib/lz4hc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index 5e2dd2a..02eafaf 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -173,12 +173,11 @@ static unsigned LZ4HC_reverseCountPattern(const BYTE* ip, const BYTE* const iLow
if (LZ4_read32(ip-4) != pattern) break;
ip -= 4;
}
- while (likely(ip>iLow)) {
- const BYTE* bytePtr = (const BYTE*)(&pattern) + 3; /* works for any endianess */
- if (ip[-1] != *bytePtr) break;
- ip--; bytePtr--;
- }
-
+ { const BYTE* bytePtr = (const BYTE*)(&pattern) + 3; /* works for any endianess */
+ while (likely(ip>iLow)) {
+ if (ip[-1] != *bytePtr) break;
+ ip--; bytePtr--;
+ } }
return (unsigned)(iStart - ip);
}