Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libsa Use the MAX() macro from <sys/param.h> instead...



details:   https://anonhg.NetBSD.org/src/rev/908618a67c3c
branches:  trunk
changeset: 543365:908618a67c3c
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Feb 23 22:47:43 2003 +0000

description:
Use the MAX() macro from <sys/param.h> instead of a local inline.  Results
in same code size in ufs.c and removes an unused inline function in lfs.c.

diffstat:

 sys/lib/libsa/lfs.c |   8 +-------
 sys/lib/libsa/ufs.c |  12 +++---------
 2 files changed, 4 insertions(+), 16 deletions(-)

diffs (55 lines):

diff -r fc8fd4874aa4 -r 908618a67c3c sys/lib/libsa/lfs.c
--- a/sys/lib/libsa/lfs.c       Sun Feb 23 22:41:24 2003 +0000
+++ b/sys/lib/libsa/lfs.c       Sun Feb 23 22:47:43 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.8 2003/01/24 21:55:18 fvdl Exp $ */
+/* $NetBSD: lfs.c,v 1.9 2003/02/23 22:47:44 simonb Exp $ */
 
 /*-
  * Copyright (c) 1993
@@ -81,12 +81,6 @@
 #include <lib/libkern/libkern.h>
 #else
 #include <string.h>
-inline u_int
-max(a, b)
-        u_int a, b;
-{
-        return (a > b ? a : b);
-}
 #endif
 
 #include "stand.h"
diff -r fc8fd4874aa4 -r 908618a67c3c sys/lib/libsa/ufs.c
--- a/sys/lib/libsa/ufs.c       Sun Feb 23 22:41:24 2003 +0000
+++ b/sys/lib/libsa/ufs.c       Sun Feb 23 22:47:43 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs.c,v 1.31 2003/01/24 21:55:18 fvdl Exp $    */
+/*     $NetBSD: ufs.c,v 1.32 2003/02/23 22:47:43 simonb Exp $  */
 
 /*-
  * Copyright (c) 1993
@@ -80,12 +80,6 @@
 #include <lib/libkern/libkern.h>
 #else
 #include <string.h>
-inline u_int
-max(a, b)
-        u_int a, b;
-{
-        return (a > b ? a : b);
-}
 #endif
 
 #include "stand.h"
@@ -758,8 +752,8 @@
 {
        int i;
 
-       fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect);       /* XXX */
-       fs->fs_interleave = max(fs->fs_interleave, 1);          /* XXX */
+       fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect);       /* XXX */
+       fs->fs_interleave = MAX(fs->fs_interleave, 1);          /* XXX */
        if (fs->fs_postblformat == FS_42POSTBLFMT)              /* XXX */
                fs->fs_nrpos = 8;                               /* XXX */
        if (fs->fs_inodefmt < FS_44INODEFMT) {                  /* XXX */



Home | Main Index | Thread Index | Old Index