summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-01-24 12:11:31 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-01-24 12:11:31 +0000
commit33776f88dc7a21766cda77b39d94c1b57a18ddc2 (patch)
treeb31855c8a65a23be32e28129e6ef6b841a1500fe /libexec
parent3d5a7ba605c55d5a349fd48ea3ce463a951502fc (diff)
downloadFreeBSD-src-33776f88dc7a21766cda77b39d94c1b57a18ddc2.zip
FreeBSD-src-33776f88dc7a21766cda77b39d94c1b57a18ddc2.tar.gz
Change brk's prototype from char *brk(const char *) to int brk(const void *)
and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t). This makes us more consistant with NetBSD and standards which include these functions. Bruce pointed out that ptrdiff_t would probably have been better than intptr_t, but this doesn't match other implimentations. Also remove local declarations of sbrk and unnecessary casting. PR: 32296 Tested by: Harti Brandt <brandt@fokus.gmd.de> MFC after: 1 month
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-aout/rtld.c2
-rw-r--r--libexec/rtld-elf/malloc.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c
index 7f0908b..6769fa1 100644
--- a/libexec/rtld-aout/rtld.c
+++ b/libexec/rtld-aout/rtld.c
@@ -2518,7 +2518,7 @@ malloc(size)
newbrk = (char *)
roundup2((unsigned long)rtld_alloc_lev, PAGSIZ);
- if (brk(newbrk) == (char *)-1)
+ if (brk(newbrk) == -1)
return NULL;
}
diff --git a/libexec/rtld-elf/malloc.c b/libexec/rtld-elf/malloc.c
index cb00a20..1e0664c 100644
--- a/libexec/rtld-elf/malloc.c
+++ b/libexec/rtld-elf/malloc.c
@@ -119,7 +119,6 @@ union overhead {
*/
#define NBUCKETS 30
static union overhead *nextf[NBUCKETS];
-extern char *sbrk();
static int pagesz; /* page size */
static int pagebucket; /* page size bucket */
OpenPOWER on IntegriCloud