]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] zlib: use kernel min/max
authorAndrew Morton <akpm@osdl.org>
Thu, 18 Mar 2004 23:02:04 +0000 (15:02 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 18 Mar 2004 23:02:04 +0000 (15:02 -0800)
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.

lib/zlib_deflate/deftree.c

index e4253f965b5cab04db3382318092c1f8af2439a1..ddf348299f244a9db0b5f430b2df3b173298b4ac 100644 (file)
@@ -217,10 +217,6 @@ static void send_bits(
 }
 #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,
  * this function may be called by two threads concurrently, but this is
@@ -598,7 +594,7 @@ static void build_tree(
 
         /* Create a new node father of n and m */
         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;
 #ifdef DUMP_BL_TREE
         if (tree == s->bl_tree) {