Source-Changes-HG archive

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

[src/trunk]: src/sbin/fdisk put the error check in the conditional where it b...



details:   https://anonhg.NetBSD.org/src/rev/48a05839eb38
branches:  trunk
changeset: 771730:48a05839eb38
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 02 03:04:11 2011 +0000

description:
put the error check in the conditional where it belongs.

diffstat:

 sbin/fdisk/fdisk.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 24c8b2e58b7b -r 48a05839eb38 sbin/fdisk/fdisk.c
--- a/sbin/fdisk/fdisk.c        Fri Dec 02 00:25:37 2011 +0000
+++ b/sbin/fdisk/fdisk.c        Fri Dec 02 03:04:11 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdisk.c,v 1.135 2011/12/01 22:24:29 christos Exp $ */
+/*     $NetBSD: fdisk.c,v 1.136 2011/12/02 03:04:11 christos Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: fdisk.c,v 1.135 2011/12/01 22:24:29 christos Exp $");
+__RCSID("$NetBSD: fdisk.c,v 1.136 2011/12/02 03:04:11 christos Exp $");
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -2179,10 +2179,10 @@
                        errtext = check_ext_overlap(part, sysid, start, size, 1);
                else
                        errtext = check_overlap(part, sysid, start, size, 1);
+               if (errtext)
+                       errx(1, "%s\n", errtext);
        }
 
-       if (errtext)
-               errx(1, "%s\n", errtext);
 
        if (sysid == 0) {
                /* delete this partition - save info though */



Home | Main Index | Thread Index | Old Index