Commit 65a0fc80 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] zlib: use kernel min/max

From: "Randy.Dunlap" <rddunlap@osdl.org>

From: Michael Veeck <michael.veeck@gmx.net>

Remove unnecessary min/max macros and changes calls to use kernel.h macros
instead.
parent 688d6d30
...@@ -217,10 +217,6 @@ static void send_bits( ...@@ -217,10 +217,6 @@ static void send_bits(
} }
#endif /* DEBUG_ZLIB */ #endif /* DEBUG_ZLIB */
#define MAX(a,b) (a >= b ? a : b)
/* the arguments must not have side effects */
/* =========================================================================== /* ===========================================================================
* Initialize the various 'constant' tables. In a multi-threaded environment, * Initialize the various 'constant' tables. In a multi-threaded environment,
* this function may be called by two threads concurrently, but this is * this function may be called by two threads concurrently, but this is
...@@ -598,7 +594,7 @@ static void build_tree( ...@@ -598,7 +594,7 @@ static void build_tree(
/* Create a new node father of n and m */ /* Create a new node father of n and m */
tree[node].Freq = tree[n].Freq + tree[m].Freq; tree[node].Freq = tree[n].Freq + tree[m].Freq;
s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1); s->depth[node] = (uch) (max(s->depth[n], s->depth[m]) + 1);
tree[n].Dad = tree[m].Dad = (ush)node; tree[n].Dad = tree[m].Dad = (ush)node;
#ifdef DUMP_BL_TREE #ifdef DUMP_BL_TREE
if (tree == s->bl_tree) { if (tree == s->bl_tree) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment