Commit e7974947 authored by Andreas Schwab's avatar Andreas Schwab
Browse files

* alloc.c (overrun_check_malloc, overrun_check_realloc)

(overrun_check_free): Protoize.
parent 718ad21a
2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free): Protoize.
2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
* sysdep.c (emacs_read, emacs_write): Check for negative sizes
......
......@@ -559,8 +559,7 @@ static int check_depth;
/* Like malloc, but wraps allocated block with header and trailer. */
POINTER_TYPE *
overrun_check_malloc (size)
size_t size;
overrun_check_malloc (size_t size)
{
register unsigned char *val;
size_t overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_SIZE*2 : 0;
......@@ -584,11 +583,9 @@ overrun_check_malloc (size)
with header and trailer. */
POINTER_TYPE *
overrun_check_realloc (block, size)
POINTER_TYPE *block;
size_t size;
overrun_check_realloc (POINTER_TYPE *block, size_t size)
{
register unsigned char *val = (unsigned char *)block;
register unsigned char *val = (unsigned char *) block;
size_t overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_SIZE*2 : 0;
if (val
......@@ -624,10 +621,9 @@ overrun_check_realloc (block, size)
/* Like free, but checks block for overrun. */
void
overrun_check_free (block)
POINTER_TYPE *block;
overrun_check_free (POINTER_TYPE *block)
{
unsigned char *val = (unsigned char *)block;
unsigned char *val = (unsigned char *) block;
++check_depth;
if (val
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment