From 3d4f41b826b79ebfdc29992628cdcf13ab199a44 Mon Sep 17 00:00:00 2001 From: devdanzin <74280297+devdanzin@users.noreply.github.com> Date: Tue, 31 Mar 2026 23:14:45 -0300 Subject: [PATCH] fix: remove duplicate blockMode assignment in compress_begin The blockMode preference is set at lines 321-328 and then identically again at lines 348-355 in compress_begin. Remove the second redundant assignment. Found using cext-review-toolkit (https://github.com/devdanzin/cext-review-toolkit). Co-Authored-By: Claude Opus 4.6 (1M context) --- lz4/frame/_frame.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lz4/frame/_frame.c b/lz4/frame/_frame.c index 440b0b5..a3d1353 100644 --- a/lz4/frame/_frame.c +++ b/lz4/frame/_frame.c @@ -345,16 +345,6 @@ compress_begin (PyObject * Py_UNUSED (self), PyObject * args, return NULL; } - if (block_linked) - { - preferences.frameInfo.blockMode = LZ4F_blockLinked; - } - else - { - preferences.frameInfo.blockMode = LZ4F_blockIndependent; - } - - preferences.frameInfo.contentSize = source_size; context =