]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
text-utils: use min() from c.h
authorPetr Uzel <petr.uzel@suse.cz>
Thu, 17 May 2012 07:41:08 +0000 (09:41 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 23 May 2012 07:56:51 +0000 (09:56 +0200)
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
text-utils/display.c

index ad638e7f7b2914e70a56e962c512b606efba33d4..84ec5d817d907e950f35c27a3fd91f8af5b5467f 100644 (file)
 #include <string.h>
 #include "hexdump.h"
 #include "xalloc.h"
+#include "c.h"
 
 static void doskip(const char *, int);
 static u_char *get(void);
 
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
-
 enum _vflag vflag = FIRST;
 
 static off_t address;                  /* address/offset in stream */
@@ -262,7 +259,7 @@ get(void)
                        return(curp);
                }
                n = fread((char *)curp + nread, sizeof(unsigned char),
-                   length == -1 ? need : MIN(length, need), stdin);
+                   length == -1 ? need : min(length, need), stdin);
                if (!n) {
                        if (ferror(stdin))
                                warn("%s", _argv[-1]);