Module Name: src Committed By: christos Date: Fri Dec 2 03:04:11 UTC 2011
Modified Files: src/sbin/fdisk: fdisk.c Log Message: put the error check in the conditional where it belongs. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sbin/fdisk/fdisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/fdisk/fdisk.c diff -u src/sbin/fdisk/fdisk.c:1.135 src/sbin/fdisk/fdisk.c:1.136 --- src/sbin/fdisk/fdisk.c:1.135 Thu Dec 1 17:24:29 2011 +++ src/sbin/fdisk/fdisk.c Thu Dec 1 22:04:11 2011 @@ -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 @@ change_part(int extended, int part, int 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 */