From ace5e90b3dbc33f0fc34ac2f3dc40d3c990a6a11 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 2 Jul 2012 17:28:05 +0200 Subject: Update lzo version --- lzo/src/lzo1f_1.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lzo/src/lzo1f_1.c') 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; } -- cgit v1.2.3