summaryrefslogtreecommitdiff
path: root/src/p_lzo.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-08-21 16:30:40 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-08-21 16:30:49 +0900
commitaddc69dda437488e8a5d89c800931f9703eca29b (patch)
treeedfd21ca2a50df0779100bebcef66c80065f2ba9 /src/p_lzo.c
parent7df1602b129bd56916aaa6037a9cb84e1bdd77d4 (diff)
downloadlzop-addc69dda437488e8a5d89c800931f9703eca29b.tar.gz
lzop-addc69dda437488e8a5d89c800931f9703eca29b.tar.bz2
lzop-addc69dda437488e8a5d89c800931f9703eca29b.zip
Imported Upstream version 1.04upstream/1.04submit/upstream/20170906.015405
Change-Id: Ia672514693f8c284b333fcb40f4826fa96ad61e6 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'src/p_lzo.c')
-rw-r--r--src/p_lzo.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/p_lzo.c b/src/p_lzo.c
index bacb28d..36716a2 100644
--- a/src/p_lzo.c
+++ b/src/p_lzo.c
@@ -2,7 +2,7 @@
This file is part of the lzop file compressor.
- Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
lzop and the LZO library are free software; you can redistribute them
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
@@ -158,7 +158,7 @@ void lzo_init_compress_header(header_t *h)
# define ALIGN_SIZE 1
#endif
-/* LZO may expand uncompressible data by a small amount */
+/* LZO may expand incompressible data by a small amount */
#define MAX_COMPRESSED_SIZE(x) ((x) + (x) / 16 + 64 + 3)
@@ -192,7 +192,7 @@ static lzo_bool alloc_mem(lzo_uint32 s1, lzo_uint32 s2, lzo_uint32 w)
**************************************************************************/
/* maybe make this an option ? */
-static const lzo_uint block_size = BLOCK_SIZE;
+static const lzo_uint32 block_size = BLOCK_SIZE;
lzo_bool lzo_enter(const header_t *h)
{
@@ -300,7 +300,7 @@ lzo_bool lzo_compress(file_t *fip, file_t *fop, const header_t *h)
{
/* read a block */
l = read_buf(fip, b1, block_size);
- src_len = (l > 0 ? l : 0);
+ src_len = (lzo_uint32) (l > 0 ? l : 0);
/* write uncompressed block size */
write32(fop,src_len);
@@ -352,9 +352,9 @@ lzo_bool lzo_compress(file_t *fip, file_t *fop, const header_t *h)
/* write compressed block size */
if (dst_len < src_len)
- write32(fop,dst_len);
+ write32(fop, (lzo_uint32) dst_len);
else
- write32(fop,src_len);
+ write32(fop, src_len);
/* write checksum of uncompressed block */
if (h->flags & F_ADLER32_D)
@@ -589,7 +589,4 @@ lzo_bool lzo_decompress(file_t *fip, file_t *fop,
#endif /* WITH_LZO */
-/*
-vi:ts=4:et
-*/
-
+/* vim:set ts=4 sw=4 et: */