diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-25 16:52:35 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-25 16:52:35 +0000 |
commit | 35b490e52bc1705f8df409978abb95f608326fee (patch) | |
tree | 6f9cf040a8f3050204c1614878e72e5f88101105 /sbin | |
parent | 67a28655a624d1aba69102859974398122b37327 (diff) |
Fix my screwup and don't return NULL from sort_paritions.
Problem found by ckuethe@, slightly different fix than the one
proposed by otto@ applied.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/disklabel/editor.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 6815a8a706f..79110be029d 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.164 2008/01/22 01:47:33 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.165 2008/01/25 16:52:34 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.164 2008/01/22 01:47:33 krw Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.165 2008/01/25 16:52:34 krw Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -1152,9 +1152,6 @@ sort_partitions(struct disklabel *lp) spp[npartitions++] = &lp->d_partitions[i]; } - if (npartitions == 0) - return(NULL); - /* * Sort the partitions based on starting offset. * This is safe because we guarantee no overlap. |