git: ef3fefe03103 - stable/13 - kern_malloc: remove '.' and '\n' from KASSERT/panic

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sat, 28 Sep 2024 21:52:16 UTC
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=ef3fefe0310355cfe89a7e48acbb353915ffb2f9

commit ef3fefe0310355cfe89a7e48acbb353915ffb2f9
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-07-23 18:27:46 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-09-28 19:29:06 +0000

    kern_malloc: remove '.' and '\n' from KASSERT/panic
    
    KASSERT and panic calls should not have a '.' at the end of the message
    and do not need '\n'.  Remove these.
    
    No functional changes.
    
    Reported by:    markj (during review of D45812)
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    markj, kib
    Differential Revision: https://reviews.freebsd.org/D46093
    
    (cherry picked from commit c0df224ba5b1fe6257dd197f8298bf59fb6e520f)
---
 sys/kern/kern_malloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 1a00e184c83f..6a36f982cc78 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -713,7 +713,7 @@ malloc_domain(size_t *sizep, int *indxp, struct malloc_type *mtp, int domain,
 
 	size = *sizep;
 	KASSERT(size <= kmem_zmax && (flags & M_EXEC) == 0,
-	    ("malloc_domain: Called with bad flag / size combination."));
+	    ("malloc_domain: Called with bad flag / size combination"));
 	if (size & KMEM_ZMASK)
 		size = (size & ~KMEM_ZMASK) + KMEM_ZBASE;
 	indx = kmemsize[size >> KMEM_ZSHIFT];
@@ -990,7 +990,7 @@ zfree(void *addr, struct malloc_type *mtp)
 
 	vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab);
 	if (slab == NULL)
-		panic("free: address %p(%p) has not been allocated.\n",
+		panic("free: address %p(%p) has not been allocated",
 		    addr, (void *)((u_long)addr & (~UMA_SLAB_MASK)));
 
 	switch (GET_SLAB_COOKIE(slab)) {
@@ -1156,7 +1156,7 @@ malloc_usable_size(const void *addr)
 #else
 	vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab);
 	if (slab == NULL)
-		panic("malloc_usable_size: address %p(%p) is not allocated.\n",
+		panic("malloc_usable_size: address %p(%p) is not allocated",
 		    addr, (void *)((u_long)addr & (~UMA_SLAB_MASK)));
 
 	switch (GET_SLAB_COOKIE(slab)) {