aboutsummaryrefslogtreecommitdiff
path: root/archival/lzop.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-04-08 13:45:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-08 13:45:04 +0200
commit15684bf5456a7cd12355da0b49cfdcdaf6463e11 (patch)
tree82a0cdc1eac63753d5658b5f1f0f9122c6634b60 /archival/lzop.c
parent3a7d16d48885cf880cf404ef23f5fc48c1d1dc6a (diff)
downloadbusybox-w32-15684bf5456a7cd12355da0b49cfdcdaf6463e11.tar.gz
busybox-w32-15684bf5456a7cd12355da0b49cfdcdaf6463e11.tar.bz2
busybox-w32-15684bf5456a7cd12355da0b49cfdcdaf6463e11.zip
lzop: checksum reads do not need to be checksummed
function old new delta do_lzo_decompress 404 427 +23 f_read32 22 - -22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r--archival/lzop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/lzop.c b/archival/lzop.c
index e724b9edf..acf01829d 100644
--- a/archival/lzop.c
+++ b/archival/lzop.c
@@ -921,7 +921,7 @@ static void write_header(header_t *h)
921 921
922 h->flags32 = htonl(h->flags32); /* native endianness for lzo_compress() */ 922 h->flags32 = htonl(h->flags32); /* native endianness for lzo_compress() */
923 923
924 /*f_*/write32(chksum_getresult(h->flags32)); 924 write32(chksum_getresult(h->flags32));
925} 925}
926 926
927static int read_header(header_t *h) 927static int read_header(header_t *h)
@@ -986,7 +986,7 @@ static int read_header(header_t *h)
986 /* UNUSED h->len_and_name[1+l] = 0; */ 986 /* UNUSED h->len_and_name[1+l] = 0; */
987 987
988 checksum = chksum_getresult(h->flags32); 988 checksum = chksum_getresult(h->flags32);
989 if (f_read32() != checksum) 989 if (read32() != checksum)
990 return 2; 990 return 2;
991 991
992 /* skip extra field [not used yet] */ 992 /* skip extra field [not used yet] */
@@ -1002,7 +1002,7 @@ static int read_header(header_t *h)
1002 for (k = 0; k < extra_field_len; k++) 1002 for (k = 0; k < extra_field_len; k++)
1003 f_read(&dummy, 1); 1003 f_read(&dummy, 1);
1004 checksum = chksum_getresult(h->flags32); 1004 checksum = chksum_getresult(h->flags32);
1005 extra_field_checksum = f_read32(); 1005 extra_field_checksum = read32();
1006 if (extra_field_checksum != checksum) 1006 if (extra_field_checksum != checksum)
1007 return 3; 1007 return 3;
1008 } 1008 }