summaryrefslogtreecommitdiff
path: root/lzo/src/lzo1.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-02 17:28:05 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-02 17:28:05 +0200
commit6a4ba5d3976f6d219400a46c634dd479bc5981a5 (patch)
treeb9514fea0817906859843475fe8455070de25064 /lzo/src/lzo1.c
parent73d3b9c032eae2074726cd3668546af1c44a8323 (diff)
Update lzo version
Diffstat (limited to 'lzo/src/lzo1.c')
-rw-r--r--lzo/src/lzo1.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lzo/src/lzo1.c b/lzo/src/lzo1.c
index de23164..edf1c3a 100644
--- a/lzo/src/lzo1.c
+++ b/lzo/src/lzo1.c
@@ -2,6 +2,9 @@
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
@@ -364,7 +367,7 @@ do_compress ( const lzo_bytep in , lzo_uint in_len,
goto the_end;
/* init dictionary */
-#if defined(LZO_DETERMINISTIC)
+#if (LZO_DETERMINISTIC)
BZERO8_PTR(wrkmem,sizeof(lzo_dict_t),D_SIZE);
#endif
@@ -374,7 +377,7 @@ do_compress ( const lzo_bytep in , lzo_uint in_len,
DVAL_NEXT(dv,ip);
do {
- lzo_uint m_off;
+ LZO_DEFINE_UNINITIALIZED_VAR(lzo_uint, m_off, 0);
lzo_uint dindex;
DINDEX1(dindex,ip);
@@ -400,13 +403,13 @@ literal:
match:
UPDATE_I(dict,0,dindex,ip,in);
-#if !defined(NDEBUG) && defined(LZO_DICT_USE_PTR)
+#if !defined(NDEBUG) && (LZO_DICT_USE_PTR)
m_pos_sav = m_pos;
#endif
m_pos += 3;
{
/* we have found a match (of at least length 3) */
-#if !defined(NDEBUG) && !defined(LZO_DICT_USE_PTR)
+#if !defined(NDEBUG) && !(LZO_DICT_USE_PTR)
assert((m_pos_sav = ip - m_off) == (m_pos - 3));
#endif
/* 1) store the current literal run */
@@ -613,7 +616,7 @@ lzo1_compress ( const lzo_bytep in , lzo_uint in_len,
int r = LZO_E_OK;
/* don't try to compress a block that's too short */
- if (in_len <= 0)
+ if (in_len == 0)
*out_len = 0;
else if (in_len <= MIN_MATCH_LONG + DVAL_LEN + 1)
{