util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] last: use min() from c.h
@ 2012-05-17  7:41 Petr Uzel
  2012-05-17  7:41 ` [PATCH 2/4] mkfs.cramfs: remove unused 'MIN' macro definition Petr Uzel
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Petr Uzel @ 2012-05-17  7:41 UTC (permalink / raw)
  To: util-linux


Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-05-23  8:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17  7:41 [PATCH 1/4] last: use min() from c.h Petr Uzel
2012-05-17  7:41 ` [PATCH 2/4] mkfs.cramfs: remove unused 'MIN' macro definition Petr Uzel
2012-05-23  8:23   ` Karel Zak
2012-05-17  7:41 ` [PATCH 3/4] text-utils: use min() from c.h Petr Uzel
2012-05-23  8:22   ` Karel Zak
2012-05-17  7:41 ` [PATCH 4/4] libuuid: use max() " Petr Uzel
2012-05-23  8:24   ` Karel Zak
2012-05-23  8:13 ` [PATCH 1/4] last: use min() " Karel Zak
2012-05-23  8:23   ` Petr Uzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).