]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
LZO1X: fix lzo1x_worst_compress
authorNitin Gupta <nitingupta910@gmail.com>
Mon, 16 Jul 2007 06:37:21 +0000 (23:37 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:34 +0000 (09:05 -0700)
This is a correction for a macro which gives worst case compressed data
size by LZO1X.

This patch was provided by the LZO author (Markus Oberhumer).

Signed-off-by: Nitin Gupta <nitingupta910@gmail.com>
Cc: "Markus F.X.J. Oberhumer" <markus@oberhumer.com>
Cc: "Richard Purdie" <rpurdie@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/lzo.h

index 582d8b711a13c895d73ad6babd828615054598fe..d793497ec1ca92ddfc0b12ba9854650b64f7beb1 100644 (file)
@@ -17,7 +17,7 @@
 #define LZO1X_MEM_COMPRESS     (16384 * sizeof(unsigned char *))
 #define LZO1X_1_MEM_COMPRESS   LZO1X_MEM_COMPRESS
 
-#define lzo1x_worst_compress(x) (x + (x / 64) + 16 + 3)
+#define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3)
 
 /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */
 int lzo1x_1_compress(const unsigned char *src, size_t src_len,