diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-01 16:22:28 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-01 16:22:28 +0000 |
commit | a3fdd5d5b5e5335871b12d6292975bdeed436235 (patch) | |
tree | e8c916ef0db66d90665eb221cf44a69bd7fa5e64 /sbin/disklabel/editor.c | |
parent | 6b39c0414015bb6bba5eab4ae5803308fba02b46 (diff) |
get_size() no longer allows DL_GETPSIZE()+DL_GETPOFFSET >
ending_sector, so no need to check for this condition after calling
get_size().
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r-- | sbin/disklabel/editor.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 <Todd.Miller@courtesan.com> @@ -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 <sys/types.h> @@ -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); } |