diff options
author | Nitin Gupta <nitingupta910@gmail.com> | 2007-07-16 02:37:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:34 -0400 |
commit | f2a11b158a24301e9158e9c873fa88e5eb775486 (patch) | |
tree | b8abed0086ad13c2b3b8f5760dd86670defa97ac | |
parent | 248a9dc32a24a80cd13a1be66dae099d97381155 (diff) |
LZO1X: fix lzo1x_worst_compress
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>
-rw-r--r-- | include/linux/lzo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 582d8b711a13..d793497ec1ca 100644 --- a/include/linux/lzo.h +++ b/include/linux/lzo.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) | 17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) |
18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS | 18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS |
19 | 19 | ||
20 | #define lzo1x_worst_compress(x) (x + (x / 64) + 16 + 3) | 20 | #define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3) |
21 | 21 | ||
22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ | 22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ |
23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, | 23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, |