]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
compression: lzxpress_compress: fix no-op shift of 0
authorMatt Suiche <msuiche@comae.com>
Mon, 14 Jun 2021 23:14:51 +0000 (11:14 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 May 2022 02:22:35 +0000 (02:22 +0000)
Signed-off-by: Matt Suiche <msuiche@comae.com>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/compression/lzxpress.c

index 77f2b8a724de3eaa067b05ae26490c879f25907b..4b2ffbda0f2d84c917f44f5c5900b4f1479dfd51 100644 (file)
@@ -223,7 +223,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
 
        if ((indic_bit % 32) > 0) {
                for (; (indic_bit % 32) != 0; indic_bit++)
-                       indic |= 0 << (32 - ((indic_bit % 32) + 1));
+                       indic |= 1U << (32 - ((indic_bit % 32) + 1));
 
                SIVAL(compressed, compressed_pos, 0);
                SIVAL(indic_pos, 0, indic);