diff options
author | 2003-09-07 18:57:05 +0000 | |
---|---|---|
committer | 2003-09-07 18:57:05 +0000 | |
commit | 297d64c36abffd764e2b42987e081a9b2396da4b (patch) | |
tree | 9a8e5840f24fb70bd661308f8241ace09a4237e5 /lib/libc/stdlib/heapsort.c | |
parent | - add -P to SYNOPSIS (diff) | |
download | wireguard-openbsd-297d64c36abffd764e2b42987e081a9b2396da4b.tar.xz wireguard-openbsd-297d64c36abffd764e2b42987e081a9b2396da4b.zip |
typos from Brian Poole;
ok deraadt@
Diffstat (limited to 'lib/libc/stdlib/heapsort.c')
-rw-r--r-- | lib/libc/stdlib/heapsort.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c index 604aa37d4d2..e8f090524f7 100644 --- a/lib/libc/stdlib/heapsort.c +++ b/lib/libc/stdlib/heapsort.c @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: heapsort.c,v 1.4 2003/06/02 20:18:37 millert Exp $"; +static char *rcsid = "$OpenBSD: heapsort.c,v 1.5 2003/09/07 18:57:05 jmc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -68,7 +68,7 @@ static char *rcsid = "$OpenBSD: heapsort.c,v 1.4 2003/06/02 20:18:37 millert Exp * Build the list into a heap, where a heap is defined such that for * the records K1 ... KN, Kj/2 >= Kj for 1 <= j/2 <= j <= N. * - * There two cases. If j == nmemb, select largest of Ki and Kj. If + * There are two cases. If j == nmemb, select largest of Ki and Kj. If * j < nmemb, select largest of Ki, Kj and Kj+1. */ #define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \ @@ -90,12 +90,12 @@ static char *rcsid = "$OpenBSD: heapsort.c,v 1.4 2003/06/02 20:18:37 millert Exp * Select the top of the heap and 'heapify'. Since by far the most expensive * action is the call to the compar function, a considerable optimization * in the average case can be achieved due to the fact that k, the displaced - * elememt, is ususally quite small, so it would be preferable to first + * elememt, is usually quite small, so it would be preferable to first * heapify, always maintaining the invariant that the larger child is copied * over its parent's record. * * Then, starting from the *bottom* of the heap, finding k's correct place, - * again maintianing the invariant. As a result of the invariant no element + * again maintaining the invariant. As a result of the invariant no element * is 'lost' when k is assigned its correct place in the heap. * * The time savings from this optimization are on the order of 15-20% for the |