Skip to content

Commit

Permalink
mem: align all prototypes for realloc functions
Browse files Browse the repository at this point in the history
(cherry picked from commit 379dada)
  • Loading branch information
rvlad-patrascu committed Jan 12, 2023
1 parent 97af522 commit c4741cb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions mem/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ inline static void *pkg_malloc_func(unsigned long size,
return PKG_MALLOC_(mem_block, size, file, function, line);
}

inline static void* pkg_realloc_func(void *ptr, unsigned int size,
inline static void* pkg_realloc_func(void *ptr, unsigned long size,
const char* file, const char* function, unsigned int line)
{
return PKG_REALLOC(mem_block, ptr, size, file, function, line);
Expand All @@ -166,7 +166,7 @@ inline static void *pkg_malloc_func(unsigned long size)
return PKG_MALLOC_(mem_block, size);
}

inline static void* pkg_realloc_func(void *ptr, unsigned int size)
inline static void* pkg_realloc_func(void *ptr, unsigned long size)
{
return PKG_REALLOC(mem_block, ptr, size);
}
Expand Down
4 changes: 2 additions & 2 deletions mem/mem_funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifdef DBG_MALLOC
typedef void *(*osips_malloc_f) (unsigned long size,
const char *file, const char *func, unsigned int line);
typedef void *(*osips_realloc_f) (void *ptr, unsigned int size,
typedef void *(*osips_realloc_f) (void *ptr, unsigned long size,
const char *file, const char *func, unsigned int line);
typedef void (*osips_free_f) (void *ptr,
const char *file, const char *func, unsigned int line);
Expand All @@ -36,7 +36,7 @@ typedef void (*osips_free_f) (void *ptr,
__FILE__, __FUNCTION__, __LINE__ )
#else
typedef void *(*osips_malloc_f) (unsigned long size);
typedef void *(*osips_realloc_f) (void *ptr, unsigned int size);
typedef void *(*osips_realloc_f) (void *ptr, unsigned long size);
typedef void (*osips_free_f) (void *ptr);
#define func_malloc(_func, _size) (_func)(_size)
#define func_realloc(_func, _ptr, _size) (_func)(_ptr, _size)
Expand Down
4 changes: 2 additions & 2 deletions mem/rpm_mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ inline static void* _rpm_malloc(unsigned long size,
}


inline static void* _rpm_realloc(void *ptr, unsigned int size,
inline static void* _rpm_realloc(void *ptr, unsigned long size,
const char* file, const char* function, unsigned int line )
{
void *p;
Expand Down Expand Up @@ -276,7 +276,7 @@ inline static void* rpm_malloc(unsigned long size)
}

#define rpm_realloc_func rpm_realloc
inline static void* rpm_realloc(void *ptr, unsigned int size)
inline static void* rpm_realloc(void *ptr, unsigned long size)
{
void *p;

Expand Down
10 changes: 5 additions & 5 deletions mem/shm_mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ inline static void* _shm_malloc_bulk(unsigned long size,
return p;
}

inline static void* _shm_realloc(void *ptr, unsigned int size,
inline static void* _shm_realloc(void *ptr, unsigned long size,
const char* file, const char* function, unsigned int line )
{
void *p;
Expand Down Expand Up @@ -398,8 +398,8 @@ inline static void* _shm_realloc(void *ptr, unsigned int size,
return p;
}

inline static void* _shm_realloc_unsafe(void *ptr, unsigned int size,
const char* file, const char* function, int line )
inline static void* _shm_realloc_unsafe(void *ptr, unsigned long size,
const char* file, const char* function, unsigned int line )
{
void *p;

Expand Down Expand Up @@ -590,7 +590,7 @@ inline static void* shm_malloc_bulk(unsigned long size)
}

#define shm_realloc_func shm_realloc
inline static void* shm_realloc(void *ptr, unsigned int size)
inline static void* shm_realloc(void *ptr, unsigned long size)
{
void *p;

Expand Down Expand Up @@ -625,7 +625,7 @@ inline static void* shm_realloc(void *ptr, unsigned int size)
}

#define shm_realloc_func_unsafe shm_realloc_unsafe
inline static void* shm_realloc_unsafe(void *ptr, unsigned int size)
inline static void* shm_realloc_unsafe(void *ptr, unsigned long size)
{
void *p;
#ifdef SHM_EXTRA_STATS
Expand Down

0 comments on commit c4741cb

Please sign in to comment.