Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/bad144 #ifdef i386 -> #ifdef __i386__ (ok'd by fvdl)



details:   https://anonhg.NetBSD.org/src/rev/44829a2b56b4
branches:  trunk
changeset: 532701:44829a2b56b4
user:      wiz <wiz%NetBSD.org@localhost>
date:      Thu Jun 13 13:32:47 2002 +0000

description:
#ifdef i386 -> #ifdef __i386__ (ok'd by fvdl)
Don't shadow variable.
WARNS=2

diffstat:

 usr.sbin/bad144/Makefile |   3 ++-
 usr.sbin/bad144/bad144.c |  10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (62 lines):

diff -r 9ddac27cf74e -r 44829a2b56b4 usr.sbin/bad144/Makefile
--- a/usr.sbin/bad144/Makefile  Thu Jun 13 11:19:48 2002 +0000
+++ b/usr.sbin/bad144/Makefile  Thu Jun 13 13:32:47 2002 +0000
@@ -1,11 +1,12 @@
 #      from: @(#)Makefile      8.1 (Berkeley) 6/6/93
-#      $NetBSD: Makefile,v 1.8 1999/01/15 13:32:06 bouyer Exp $
+#      $NetBSD: Makefile,v 1.9 2002/06/13 13:32:47 wiz Exp $
 
 .if ${MACHINE} == "alpha" || ${MACHINE} == "i386"
 PROG=  bad144
 .endif
 DPADD+= ${LIBUTIL}
 LDADD+= -lutil
+WARNS= 2
 
 MAN=   bad144.8
 
diff -r 9ddac27cf74e -r 44829a2b56b4 usr.sbin/bad144/bad144.c
--- a/usr.sbin/bad144/bad144.c  Thu Jun 13 11:19:48 2002 +0000
+++ b/usr.sbin/bad144/bad144.c  Thu Jun 13 13:32:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bad144.c,v 1.16 2002/06/13 11:01:08 wiz Exp $  */
+/*     $NetBSD: bad144.c,v 1.17 2002/06/13 13:32:47 wiz Exp $  */
 
 /*
  * Copyright (c) 1980, 1986, 1988, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)bad144.c   8.2 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: bad144.c,v 1.16 2002/06/13 11:01:08 wiz Exp $");
+__RCSID("$NetBSD: bad144.c,v 1.17 2002/06/13 13:32:47 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -181,7 +181,7 @@
        if (dp->d_secsize > MAXSECSIZE || dp->d_secsize <= 0)
                errx(7, "Disk sector size too large/small (%d)",
                    dp->d_secsize);
-#ifdef i386
+#ifdef __i386__
        if (dp->d_type == DTYPE_SCSI)
                errx(1, "SCSI disks don't use bad144!");
        /* are we inside a DOS partition? */
@@ -189,7 +189,7 @@
                /* yes, rules change. assume bad tables at end of partition C,
                   which maps all of DOS partition we are within -wfj */
                size = dp->d_partitions[2].p_offset + dp->d_partitions[2].p_size;
-       } else
+       }
 #endif
        size = dp->d_nsectors * dp->d_ntracks * dp->d_ncylinders; 
        argc--;
@@ -256,7 +256,7 @@
        errs = 0;
        new = argc;
        while (argc > 0) {
-               daddr_t sn = atoi(*argv++);
+               sn = atoi(*argv++);
                argc--;
                if (sn < 0 || sn >= size) {
                        printf("%d: out of range [0,%d) for disk %s\n",



Home | Main Index | Thread Index | Old Index