summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/heapsort.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2010-02-08 11:01:52 +0000
committerotto <otto@openbsd.org>2010-02-08 11:01:52 +0000
commitf3749684dec0b5cc391dac64d9830a088ad38cee (patch)
treed318c9c774c73ff1ed731fb8d20c8b5e68f6b961 /lib/libc/stdlib/heapsort.c
parenttest for PKCS#11 support (currently disabled) (diff)
downloadwireguard-openbsd-f3749684dec0b5cc391dac64d9830a088ad38cee.tar.xz
wireguard-openbsd-f3749684dec0b5cc391dac64d9830a088ad38cee.zip
use size_t to index arrays; avoids big array bugs; ok millert@ guenther@
Diffstat (limited to 'lib/libc/stdlib/heapsort.c')
-rw-r--r--lib/libc/stdlib/heapsort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c
index e6fb61ba2fb..ad3fffbcd93 100644
--- a/lib/libc/stdlib/heapsort.c
+++ b/lib/libc/stdlib/heapsort.c
@@ -133,7 +133,7 @@ int
heapsort(void *vbase, size_t nmemb, size_t size,
int (*compar)(const void *, const void *))
{
- int cnt, i, j, l;
+ size_t cnt, i, j, l;
char tmp, *tmp1, *tmp2;
char *base, *k, *p, *t;