Mesa (master): util/u_debug: use MAX2 macro

Brian Paul brianp at kemper.freedesktop.org
Thu Jun 3 06:52:57 PDT 2010


Module: Mesa
Branch: master
Commit: 6cc51b982e12d8d03a188c5e033b68e68195e4a7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6cc51b982e12d8d03a188c5e033b68e68195e4a7

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Jun  3 07:52:46 2010 -0600

util/u_debug: use MAX2 macro

---

 src/gallium/auxiliary/util/u_debug.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 3d913be..954f570 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -174,12 +174,6 @@ debug_get_num_option(const char *name, long dfault)
    return result;
 }
 
-static INLINE int
-max( int a,
-     int b )
-{
-    return (a > b) ? a : b;
-}
 
 unsigned long
 debug_get_flags_option(const char *name, 
@@ -198,7 +192,7 @@ debug_get_flags_option(const char *name,
       result = dfault;
       debug_printf("%s: help for %s:\n", __FUNCTION__, name);
       for (; flags->name; ++flags)
-         namealign = max(namealign, strlen(flags->name));
+         namealign = MAX2(namealign, strlen(flags->name));
       for (flags = orig; flags->name; ++flags)
          debug_printf("| %*s [0x%0*lx]%s%s\n", namealign, flags->name,
                       sizeof(unsigned long)*CHAR_BIT/4, flags->value,



More information about the mesa-commit mailing list