Subject: kern/18162: endif comments are backwards in sys/kern/exec_conf.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <roskens@elfin.net>
List: netbsd-bugs
Date: 09/03/2002 22:39:50
>Number:         18162
>Category:       kern
>Synopsis:       endif comments are backwards in sys/kern/exec_conf.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 03 20:40:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD-current 2002/09/02
>Organization:
Elfin
>Environment:
	
	
System: NetBSD hysteria.elfin.net 1.6_RC2 NetBSD 1.6_RC2 (GENERIC) #0: Fri Aug 30 16:39:41 CDT 2002 root@hysteria.elfin.net:/d/d01/NetBSD/1.6/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386

Source snapshot of -current on 2002/09/02
>Description:
The #endif comments around EXEC_AOUT, EXEC_ELF32 and !COMPAT_NETBSD32 are backwards in sys/kern/exec_conf.c
EXEC_* is the first defined check, followed by COMPAT_NETBSD32, but the endif statements list EXEC_* first.

>How-To-Repeat:
visually inspect code
>Fix:

Apply the following patch to sys/kern/exec_conf.c:

====
diff -u -r1.74 exec_conf.c
--- exec_conf.c 2002/08/26 21:07:38     1.74
+++ exec_conf.c 2002/09/04 03:21:57
@@ -221,8 +221,8 @@
          copyargs,
          NULL,
          coredump_netbsd },
-#endif /* EXEC_AOUT */
 #endif /* !COMPAT_NETBSD32 */
+#endif /* EXEC_AOUT */

 #ifdef EXEC_COFF
        /* Native COFF */
@@ -420,8 +420,8 @@
          NULL,
          coredump_elf32 },
 #endif
-#endif /* EXEC_ELF32 */
 #endif /* !COMPAT_NETBSD32 */
+#endif /* EXEC_ELF32 */
 
 #ifdef EXEC_ELF64
        /* Native Elf64 */
====
>Release-Note:
>Audit-Trail:
>Unformatted: