diff options
author | jhb <jhb@FreeBSD.org> | 2004-01-15 18:35:32 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-01-15 18:35:32 +0000 |
commit | 4446d36fa6d21ad7e02e09e8bf72dff316f35e7c (patch) | |
tree | db2c02b984ba3cd846268f5baac168ac28e1413f /lib/libstand/zalloc_malloc.c | |
parent | 5b3c50c69d140a1c00848f8c9f6825247529758e (diff) | |
download | FreeBSD-src-4446d36fa6d21ad7e02e09e8bf72dff316f35e7c.zip FreeBSD-src-4446d36fa6d21ad7e02e09e8bf72dff316f35e7c.tar.gz |
- Print out line number in a panic message using %d rather than %p. Line
numbers aren't pointers.
- Add a __printflike() attribute to libstand's panic() prototype to catch
such bogons in the future.
Diffstat (limited to 'lib/libstand/zalloc_malloc.c')
-rw-r--r-- | lib/libstand/zalloc_malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libstand/zalloc_malloc.c b/lib/libstand/zalloc_malloc.c index cd89d05..fcc54dc 100644 --- a/lib/libstand/zalloc_malloc.c +++ b/lib/libstand/zalloc_malloc.c @@ -109,7 +109,7 @@ Free(void *ptr, const char *file, int line) return; } if (res->ga_Magic != GAMAGIC) - panic("free: guard1 fail @ %p from %s:%p", ptr, file, line); + panic("free: guard1 fail @ %p from %s:%d", ptr, file, line); res->ga_Magic = GAFREE; #endif #ifdef USEENDGUARD |