* alloc.c (overrun_check_malloc, overrun_check_realloc)
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 12 Apr 2011 10:20:32 +0000 (12:20 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Tue, 12 Apr 2011 10:20:32 +0000 (12:20 +0200)
(overrun_check_free): Protoize.

src/ChangeLog
src/alloc.c

index 3006d08..b1e1776 100644 (file)
@@ -1,3 +1,8 @@
+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
index 54c4760..6a018b8 100644 (file)
@@ -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