X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib%2Fdecompress_common.h;h=4bfaf251151643fd2d812d1619ca2482aeea9047;hb=a4123fea556d6c362318212127e25846981ea190;hp=70f7dd5a8f4ed508b636ce028105e018f0c81801;hpb=12e7f4e2f9e3254e97a67cfb2b77bbb0d166a2f2;p=wimlib diff --git a/include/wimlib/decompress_common.h b/include/wimlib/decompress_common.h index 70f7dd5a..4bfaf251 100644 --- a/include/wimlib/decompress_common.h +++ b/include/wimlib/decompress_common.h @@ -67,7 +67,7 @@ bitstream_ensure_bits(struct input_bitstream *is, const unsigned num_bits) if (unlikely(is->end - is->next < 2)) goto overflow; - is->bitbuf |= (u32)get_unaligned_u16_le(is->next) << (16 - is->bitsleft); + is->bitbuf |= (u32)get_unaligned_le16(is->next) << (16 - is->bitsleft); is->next += 2; is->bitsleft += 16; @@ -75,7 +75,7 @@ bitstream_ensure_bits(struct input_bitstream *is, const unsigned num_bits) if (unlikely(is->end - is->next < 2)) goto overflow; - is->bitbuf |= (u32)get_unaligned_u16_le(is->next); + is->bitbuf |= (u32)get_unaligned_le16(is->next); is->next += 2; is->bitsleft = 32; } @@ -141,7 +141,7 @@ bitstream_read_u16(struct input_bitstream *is) if (unlikely(is->end - is->next < 2)) return 0; - v = get_unaligned_u16_le(is->next); + v = get_unaligned_le16(is->next); is->next += 2; return v; } @@ -154,7 +154,7 @@ bitstream_read_u32(struct input_bitstream *is) if (unlikely(is->end - is->next < 4)) return 0; - v = get_unaligned_u32_le(is->next); + v = get_unaligned_le32(is->next); is->next += 4; return v; } @@ -261,7 +261,7 @@ repeat_byte(u8 b) { machine_word_t v; - BUILD_BUG_ON(WORDSIZE != 4 && WORDSIZE != 8); + STATIC_ASSERT(WORDSIZE == 4 || WORDSIZE == 8); v = b; v |= v << 8;