summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongwoo Lee <dwoo08.lee@samsung.com>2020-07-03 11:05:59 +0900
committerDongwoo Lee <dwoo08.lee@samsung.com>2020-07-03 11:35:50 +0900
commitfb9c86eae56918781cecbd9d07213e7ed7f0e4b1 (patch)
treeefcf29da2c34a4aa94ff0fc459b49fa80a7170ba
parent7ea7465257683a02711ebf1e6e7dcdfa8c16c495 (diff)
downloadlinux-4.9-exynos9110-fb9c86eae56918781cecbd9d07213e7ed7f0e4b1.tar.gz
linux-4.9-exynos9110-fb9c86eae56918781cecbd9d07213e7ed7f0e4b1.tar.bz2
linux-4.9-exynos9110-fb9c86eae56918781cecbd9d07213e7ed7f0e4b1.zip
lib: zstd: huf_decompress: Cleanup code
This fixes to explicitly initialize variable before use and removes redundant assignment. Change-Id: Id424707b886bf5dfb5473e2535d29adc46c9d92f Suggested-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r--lib/zstd/huf_decompress.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/zstd/huf_decompress.c b/lib/zstd/huf_decompress.c
index 7ecc3c12d5fb..6753153d56c2 100644
--- a/lib/zstd/huf_decompress.c
+++ b/lib/zstd/huf_decompress.c
@@ -741,7 +741,7 @@ static size_t HUF_decompress4X4_usingDTable_internal(void *dst, size_t dstSize,
BYTE *op2 = opStart2;
BYTE *op3 = opStart3;
BYTE *op4 = opStart4;
- U32 endSignal;
+ U32 endSignal = 1;
DTableDesc const dtd = HUF_getDTableDesc(DTable);
U32 const dtLog = dtd.tableLog;
@@ -786,10 +786,6 @@ static size_t HUF_decompress4X4_usingDTable_internal(void *dst, size_t dstSize,
HUF_DECODE_SYMBOLX4_0(op2, &bitD2);
HUF_DECODE_SYMBOLX4_0(op3, &bitD3);
HUF_DECODE_SYMBOLX4_0(op4, &bitD4);
- endSignal &= BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished;
- endSignal &= BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished;
- endSignal &= BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished;
- endSignal &= BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished;
endSignal = likely(
(BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished)
& (BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished)