[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46620979.9020901@punnoor.de>
Date: Sun, 03 Jun 2007 08:21:13 +0800
From: Prakash Punnoor <prakash@...noor.de>
To: Daniel Hazelton <dhazelton@...er.net>
CC: dwmw2@...radead.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [Trivial Patch] Remove JFFS2 dependency on internal Zlib header
Daniel Hazelton wrote:
>
> Signed-off-by: Daniel Hazelton <dhazelton@...er.net>
>
> DRH
>
> diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c
> index 2b87fcc..9f1b935 100644
> --- a/fs/jffs2/compr_zlib.c
> +++ b/fs/jffs2/compr_zlib.c
> @@ -16,7 +16,6 @@
> #include <linux/kernel.h>
> #include <linux/slab.h>
> #include <linux/zlib.h>
> -#include <linux/zutil.h>
> #include "nodelist.h"
> #include "compr.h"
>
> @@ -154,7 +153,7 @@ static int jffs2_zlib_decompress(unsigned char *data_in,
>
> /* If it's deflate, and it's got no preset dictionary, then
> we can tell zlib to skip the adler32 check. */
> - if (srclen > 2 && !(data_in[1] & PRESET_DICT) &&
> + if (srclen > 2 && !(data_in[1] & 0x20) &&
> ((data_in[0] & 0x0f) == Z_DEFLATED) &&
> !(((data_in[0]<<8) + data_in[1]) % 31)) {
>
Why not
#define PRESET_DICT 0x20
instead of obfuscating the code with a magic number ? (Or name it
differently if it clashes with something else...)
Cheers,
Prakash
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists