From a3fdd5d5b5e5335871b12d6292975bdeed436235 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Tue, 1 Jan 2008 16:22:28 +0000 Subject: get_size() no longer allows DL_GETPSIZE()+DL_GETPOFFSET > ending_sector, so no need to check for this condition after calling get_size(). --- sbin/disklabel/editor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sbin/disklabel/editor.c') diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 56b71e0a318..24a2189c720 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.135 2008/01/01 14:58:42 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.136 2008/01/01 16:22:27 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.135 2008/01/01 14:58:42 krw Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.136 2008/01/01 16:22:27 krw Exp $"; #endif /* not lint */ #include @@ -867,8 +867,7 @@ editor_change(struct disklabel *lp, u_int64_t *freep, char *p) if (get_size(lp, partno, freep, 0) != 0) return; - if (DL_GETPSIZE(pp) + DL_GETPOFFSET(pp) > ending_sector || - has_overlap(lp, freep, -1)) + if (has_overlap(lp, freep, -1)) make_contiguous(lp); } -- cgit v1.2.3