Subject: bin/24008: incorrect macro in ndbootd header
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jeffi@rcn.com>
List: netbsd-bugs
Date: 01/06/2004 20:26:55
>Number: 24008
>Category: bin
>Synopsis: incorrect macro in ndbootd header
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 06 20:27:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Jeff Ito
>Release: 1.6ZG
>Organization:
>Environment:
1.6ZG
>Description:
In ndbootd.h MAX is defined as
#define MAX(a, b) ((a) < (b) ? (a) : (b))
of course it should read
#define MAX(a, b) ((a) > (b) ? (a) : (b))
MAX is never used in code, MIN however is. So the macro should be removed, or corrected.
>How-To-Repeat:
N/A
>Fix:
Index: ndbootd.h
===================================================================
RCS file: /cvs/nbsd/src/usr.sbin/ndbootd/ndbootd.h,v
retrieving revision 1.4
diff -u -r1.4 ndbootd.h
--- ndbootd.h 17 Aug 2003 22:34:17 -0000 1.4
+++ ndbootd.h 6 Jan 2004 20:01:01 -0000
@@ -102,7 +102,7 @@
#define strerror(e) ((e) < sys_nerr ? sys_errlist[e] : "unknown error")
#endif /* !HAVE_STRERROR */
#ifndef MAX
-#define MAX(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif /* !MAX */
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
>Release-Note:
>Audit-Trail:
>Unformatted: