summaryrefslogtreecommitdiff
path: root/lzo/src/lzo1b_cc.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/lzo1b_cc.c
parent73d3b9c032eae2074726cd3668546af1c44a8323 (diff)
Update lzo version
Diffstat (limited to 'lzo/src/lzo1b_cc.c')
-rw-r--r--lzo/src/lzo1b_cc.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/lzo/src/lzo1b_cc.c b/lzo/src/lzo1b_cc.c
index 45b0f851..cc7c2e87 100644
--- a/lzo/src/lzo1b_cc.c
+++ b/lzo/src/lzo1b_cc.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
@@ -38,7 +41,7 @@
*/
-#define LZO_NEED_DICT_H
+#define LZO_NEED_DICT_H 1
#include "config1b.h"
@@ -57,14 +60,14 @@ int _lzo1b_do_compress ( const lzo_bytep in, lzo_uint in_len,
#endif
-#if defined(LZO_COLLECT_STATS)
+#if (LZO_COLLECT_STATS)
_lzo1b_stats_init(lzo_stats);
lzo_stats->in_len = in_len;
#endif
/* don't try to compress a block that's too short */
- if (in_len <= 0)
+ if (in_len == 0)
{
*out_len = 0;
r = LZO_E_OK;
@@ -91,15 +94,15 @@ int _lzo1b_do_compress ( const lzo_bytep in, lzo_uint in_len,
if (r == LZO_E_OK)
{
lzo_bytep op = out + *out_len;
- *op++ = M3_MARKER | 1;
- *op++ = 0;
- *op++ = 0;
+ op[0] = M3_MARKER | 1;
+ op[1] = 0;
+ op[2] = 0;
*out_len += 3;
}
#endif
-#if defined(LZO_COLLECT_STATS)
+#if (LZO_COLLECT_STATS)
lzo_stats->out_len = *out_len;
lzo_stats->match_bytes =
1 * lzo_stats->m1_matches + 2 * lzo_stats->m2_matches +
@@ -120,7 +123,7 @@ int _lzo1b_do_compress ( const lzo_bytep in, lzo_uint in_len,
/* lzo_stats_t is still defined */
-#if defined(LZO_COLLECT_STATS)
+#if (LZO_COLLECT_STATS)
static lzo_stats_t lzo_statistics;
lzo_stats_t * const lzo1b_stats = &lzo_statistics;