Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libbsdmalloc libbsdmalloc: Nix K&R definitions. Bump WA...



details:   https://anonhg.NetBSD.org/src/rev/9338439eb4da
branches:  trunk
changeset: 377264:9338439eb4da
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jul 04 18:40:14 2023 +0000

description:
libbsdmalloc: Nix K&R definitions.  Bump WARNS to 3.

diffstat:

 lib/libbsdmalloc/Makefile |   4 ++--
 lib/libbsdmalloc/malloc.c |  24 ++++++++----------------
 2 files changed, 10 insertions(+), 18 deletions(-)

diffs (92 lines):

diff -r bc74cb3239fc -r 9338439eb4da lib/libbsdmalloc/Makefile
--- a/lib/libbsdmalloc/Makefile Tue Jul 04 16:23:15 2023 +0000
+++ b/lib/libbsdmalloc/Makefile Tue Jul 04 18:40:14 2023 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2023/07/04 16:23:15 riastradh Exp $
+# $NetBSD: Makefile,v 1.7 2023/07/04 18:40:14 riastradh Exp $
 
-WARNS= 2
+WARNS= 3
 
 .include <bsd.own.mk>
 
diff -r bc74cb3239fc -r 9338439eb4da lib/libbsdmalloc/malloc.c
--- a/lib/libbsdmalloc/malloc.c Tue Jul 04 16:23:15 2023 +0000
+++ b/lib/libbsdmalloc/malloc.c Tue Jul 04 18:40:14 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: malloc.c,v 1.4 2023/07/04 15:09:04 riastradh Exp $     */
+/*     $NetBSD: malloc.c,v 1.5 2023/07/04 18:40:14 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.4 2023/07/04 15:09:04 riastradh Exp $");
+__RCSID("$NetBSD: malloc.c,v 1.5 2023/07/04 18:40:14 riastradh Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -176,8 +176,7 @@ botch(s)
 #endif
 
 void *
-malloc(nbytes)
-       size_t nbytes;
+malloc(size_t nbytes)
 {
        union overhead *op;
        int bucket;
@@ -270,8 +269,7 @@ malloc(nbytes)
  * Allocate more memory to the indicated bucket.
  */
 static void
-morecore(bucket)
-       int bucket;
+morecore(int bucket)
 {
        union overhead *op;
        long sz;                /* size of desired block */
@@ -313,8 +311,7 @@ morecore(bucket)
 }
 
 void
-free(cp)
-       void *cp;
+free(void *cp)
 {
        long size;
        union overhead *op;
@@ -357,9 +354,7 @@ free(cp)
 int __realloc_srchlen = 4;     /* 4 should be plenty, -1 =>'s whole list */
 
 void *
-realloc(cp, nbytes)
-       void *cp;
-       size_t nbytes;
+realloc(void *cp, size_t nbytes)
 {
        u_long onb;
        long i;
@@ -448,9 +443,7 @@ realloc(cp, nbytes)
  * Return bucket number, or -1 if not found.
  */
 static int
-findbucket(freep, srchlen)
-       union overhead *freep;
-       int srchlen;
+findbucket(union overhead *freep, int srchlen)
 {
        union overhead *p;
        int i, j;
@@ -475,8 +468,7 @@ findbucket(freep, srchlen)
  * frees for each size category.
  */
 void
-mstats(s)
-       char *s;
+mstats(char *s)
 {
        int i, j;
        union overhead *p;



Home | Main Index | Thread Index | Old Index