]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
RAR5 reader: removed an unused function: bf_is_last_block 1107/head
authorGrzegorz Antoniak <ga@anadoxin.org>
Thu, 13 Dec 2018 05:32:30 +0000 (06:32 +0100)
committerGrzegorz Antoniak <ga@anadoxin.org>
Thu, 13 Dec 2018 05:32:30 +0000 (06:32 +0100)
Also added a comment that will allow to easily readd this function in
case it'll be needed.

libarchive/archive_read_support_format_rar5.c

index 86478a4949fa5c0947b3dfdae1ade85d412f548c..9314f7a9f9c3f0d388cfa90b7c86220e626432c2 100644 (file)
@@ -229,7 +229,14 @@ struct bit_reader {
 /* RARv5 block header structure. Use bf_* functions to get values from
  * block_flags_u8 field. I.e. bf_byte_count, etc. */
 struct compressed_block_header {
-    uint8_t block_flags_u8; /* Fields encoded in little-endian bitfield */
+    /* block_flags_u8 contain fields encoded in little-endian bitfield:
+     *
+     * - table present flag (shr 7, and 1),
+     * - last block flag    (shr 6, and 1),
+     * - byte_count         (shr 3, and 7),
+     * - bit_size           (shr 0, and 7).
+     */
+    uint8_t block_flags_u8;
     uint8_t block_cksum;
 };
 
@@ -432,11 +439,6 @@ uint8_t bf_byte_count(const struct compressed_block_header* hdr) {
     return (hdr->block_flags_u8 >> 3) & 7;
 }
 
-static inline
-uint8_t bf_is_last_block(const struct compressed_block_header* hdr) {
-    return (hdr->block_flags_u8 >> 6) & 1;
-}
-
 static inline
 uint8_t bf_is_table_present(const struct compressed_block_header* hdr) {
     return (hdr->block_flags_u8 >> 7) & 1;