Module Name: src Committed By: riastradh Date: Wed Jul 5 01:15:47 UTC 2023
Modified Files: src/lib/libbsdmalloc: malloc.c Log Message: libbsdmalloc: Fix build with DEBUG. Nix __P while here. XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libbsdmalloc/malloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libbsdmalloc/malloc.c diff -u src/lib/libbsdmalloc/malloc.c:1.5 src/lib/libbsdmalloc/malloc.c:1.6 --- src/lib/libbsdmalloc/malloc.c:1.5 Tue Jul 4 18:40:14 2023 +++ src/lib/libbsdmalloc/malloc.c Wed Jul 5 01:15:47 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: malloc.c,v 1.5 2023/07/04 18:40:14 riastradh Exp $ */ +/* $NetBSD: malloc.c,v 1.6 2023/07/05 01:15:47 riastradh Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)malloc.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: malloc.c,v 1.5 2023/07/04 18:40:14 riastradh Exp $"); +__RCSID("$NetBSD: malloc.c,v 1.6 2023/07/05 01:15:47 riastradh Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -128,32 +128,31 @@ static u_int nmalloc[NBUCKETS]; static mutex_t malloc_mutex = MUTEX_INITIALIZER; #endif -static void morecore __P((int)); -static int findbucket __P((union overhead *, int)); +static void morecore(int); +static int findbucket(union overhead *, int); #ifdef MSTATS -void mstats __P((const char *)); +void mstats(const char *); #endif #if defined(DEBUG) || defined(RCHECK) #define ASSERT(p) if (!(p)) botch(__STRING(p)) -static void botch __P((const char *)); +static void botch(const char *); /* * NOTE: since this may be called while malloc_mutex is locked, stdio must not * be used in this function. */ static void -botch(s) - const char *s; +botch(const char *s) { struct iovec iov[3]; - iov[0].iov_base = "\nassertion botched: "; + iov[0].iov_base = __UNCONST("\nassertion botched: "); iov[0].iov_len = 20; - iov[1].iov_base = (void *)s; + iov[1].iov_base = __UNCONST(s); iov[1].iov_len = strlen(s); - iov[2].iov_base = "\n"; + iov[2].iov_base = __UNCONST("\n"); iov[2].iov_len = 1; /*