[PATCH 1/4] last: use min() from c.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx>
---
 login-utils/last.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/login-utils/last.c b/login-utils/last.c
index 34558bb..62fc55c 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -72,15 +72,11 @@ static struct utmp	utmpbuf;
 #define	LMAX	(int)sizeof(utmpbuf.ut_line)	/* size of utmp tty field */
 #define	NMAX	(int)sizeof(utmpbuf.ut_name)	/* size of utmp name field */
 
-#ifndef MIN
-#define MIN(a,b)	(((a) < (b)) ? (a) : (b))
-#endif
-
 /* maximum sizes used for printing */
 /* probably we want a two-pass version that computes the right length */
-int hmax = MIN(HMAX, 16);
-int lmax = MIN(LMAX, 8);
-int nmax = MIN(NMAX, 16);
+int hmax = min(HMAX, 16);
+int lmax = min(LMAX, 8);
+int nmax = min(NMAX, 16);
 
 typedef struct arg {
 	char	*name;				/* argument */
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux