summaryrefslogtreecommitdiff
path: root/lzo/src/lzo1f_1.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/lzo1f_1.c
parent73d3b9c032eae2074726cd3668546af1c44a8323 (diff)
Update lzo version
Diffstat (limited to 'lzo/src/lzo1f_1.c')
-rw-r--r--lzo/src/lzo1f_1.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lzo/src/lzo1f_1.c b/lzo/src/lzo1f_1.c
index 27608cee..269887ef 100644
--- a/lzo/src/lzo1f_1.c
+++ b/lzo/src/lzo1f_1.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
@@ -84,7 +87,7 @@ int do_compress ( const lzo_bytep in , lzo_uint in_len,
for (;;)
{
register const lzo_bytep m_pos;
- lzo_uint m_off;
+ LZO_DEFINE_UNINITIALIZED_VAR(lzo_uint, m_off, 0);
lzo_uint m_len;
lzo_uint dindex;
lzo_uint lit;
@@ -108,7 +111,7 @@ int do_compress ( const lzo_bytep in , lzo_uint in_len,
try_match:
#if 0 && defined(LZO_UNALIGNED_OK_2)
- if (* (const lzo_ushortp) m_pos != * (const lzo_ushortp) ip)
+ if (UA_GET16(m_pos) != UA_GET16(ip))
#else
if (m_pos[0] != ip[0] || m_pos[1] != ip[1])
#endif
@@ -282,7 +285,7 @@ lzo1f_1_compress ( const lzo_bytep in , lzo_uint in_len,
lzo_bytep op = out;
int r = LZO_E_OK;
- if (in_len <= 0)
+ if (in_len == 0)
*out_len = 0;
else if (in_len <= 10)
{
@@ -296,9 +299,9 @@ lzo1f_1_compress ( const lzo_bytep in , lzo_uint in_len,
if (r == LZO_E_OK)
{
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;
}