malloc/mtrace.c: Cosmetic cleanup.

Remove an unused #define and use ANSI prototypes.

Generated code identical on x86_64-unknown-linux-gnu.

ChangeLog:

2014-02-11  Will Newton  <will.newton@linaro.org>

	* malloc/mtrace.c (attribute_hidden): Remove unused macro
	definition.  (tr_where, tr_freehook, tr_mallochook,
	tr_reallochook, tr_memalignhook): Use ANSI protoype.
This commit is contained in:
Will Newton 2014-02-06 08:54:20 +00:00
parent 195b8165ac
commit c13a72b7c4
2 changed files with 16 additions and 31 deletions

View File

@ -1,3 +1,9 @@
2014-02-11 Will Newton <will.newton@linaro.org>
* malloc/mtrace.c (attribute_hidden): Remove unused macro
definition. (tr_where, tr_freehook, tr_mallochook,
tr_reallochook, tr_memalignhook): Use ANSI protoype.
2014-02-11 David S. Miller <davem@davemloft.net> 2014-02-11 David S. Miller <davem@davemloft.net>
* stdio-common/tst-sscanf.c (main): Use 'long' for 'dummy' when * stdio-common/tst-sscanf.c (main): Use 'long' for 'dummy' when

View File

@ -41,10 +41,6 @@
#include <kernel-features.h> #include <kernel-features.h>
#ifndef attribute_hidden
# define attribute_hidden
#endif
#define TRACE_BUFFER_SIZE 512 #define TRACE_BUFFER_SIZE 512
static FILE *mallstream; static FILE *mallstream;
@ -77,11 +73,8 @@ tr_break (void)
} }
libc_hidden_def (tr_break) libc_hidden_def (tr_break)
static void tr_where (const __ptr_t, Dl_info *) __THROW internal_function; static void internal_function
static void tr_where (const __ptr_t caller, Dl_info *info)
internal_function tr_where (caller, info)
const __ptr_t caller;
Dl_info *info;
{ {
if (caller != NULL) if (caller != NULL)
{ {
@ -114,7 +107,6 @@ Dl_info *info;
} }
} }
static Dl_info * static Dl_info *
lock_and_info (const __ptr_t caller, Dl_info *mem) lock_and_info (const __ptr_t caller, Dl_info *mem)
{ {
@ -128,11 +120,8 @@ lock_and_info (const __ptr_t caller, Dl_info *mem)
return res; return res;
} }
static void
static void tr_freehook (__ptr_t, const __ptr_t) __THROW; tr_freehook (__ptr_t ptr, const __ptr_t caller)
static void tr_freehook (ptr, caller)
__ptr_t ptr;
const __ptr_t caller;
{ {
if (ptr == NULL) if (ptr == NULL)
return; return;
@ -157,10 +146,8 @@ const __ptr_t caller;
__libc_lock_unlock (lock); __libc_lock_unlock (lock);
} }
static __ptr_t tr_mallochook (size_t, const __ptr_t) __THROW; static __ptr_t
static __ptr_t tr_mallochook (size, caller) tr_mallochook (size_t size, const __ptr_t caller)
size_t size;
const __ptr_t caller;
{ {
__ptr_t hdr; __ptr_t hdr;
@ -186,12 +173,8 @@ const __ptr_t caller;
return hdr; return hdr;
} }
static __ptr_t tr_reallochook (__ptr_t, size_t, const __ptr_t) static __ptr_t
__THROW; tr_reallochook (__ptr_t ptr, size_t size, const __ptr_t caller)
static __ptr_t tr_reallochook (ptr, size, caller)
__ptr_t ptr;
size_t size;
const __ptr_t caller;
{ {
__ptr_t hdr; __ptr_t hdr;
@ -238,11 +221,8 @@ const __ptr_t caller;
return hdr; return hdr;
} }
static __ptr_t tr_memalignhook (size_t, size_t, static __ptr_t
const __ptr_t) __THROW; tr_memalignhook (size_t alignment, size_t size, const __ptr_t caller)
static __ptr_t tr_memalignhook (alignment, size, caller)
size_t alignment, size;
const __ptr_t caller;
{ {
__ptr_t hdr; __ptr_t hdr;
@ -271,7 +251,6 @@ const __ptr_t caller;
} }
#ifdef _LIBC #ifdef _LIBC
/* This function gets called to make sure all memory the library /* This function gets called to make sure all memory the library