1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Fix dm_strdup debug definition.

This commit is contained in:
Alasdair Kergon 2006-01-10 22:19:41 +00:00
parent b6b0c621f6
commit fe94f9f170
3 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.03 - Version 1.02.03 -
============================ ============================
Fix dm_strdup debug definition.
Fix hash function to avoid using a negative array offset. Fix hash function to avoid using a negative array offset.
Don't inline _find in hash.c and tidy signed/unsigned etc. Don't inline _find in hash.c and tidy signed/unsigned etc.
Fix libdevmapper.h #endif. Fix libdevmapper.h #endif.

View File

@ -64,7 +64,7 @@ dm_is_dm_major
dm_mknodes dm_mknodes
dm_malloc_aux dm_malloc_aux
dm_malloc_aux_debug dm_malloc_aux_debug
dm_strdup dm_strdup_aux
dm_free_aux dm_free_aux
dm_realloc_aux dm_realloc_aux
dm_dump_memory_debug dm_dump_memory_debug

View File

@ -356,10 +356,9 @@ int dm_tree_node_add_target_area(struct dm_tree_node *node,
* Memory management * Memory management
*******************/ *******************/
char *dm_strdup(const char *str);
void *dm_malloc_aux(size_t s, const char *file, int line); void *dm_malloc_aux(size_t s, const char *file, int line);
void *dm_malloc_aux_debug(size_t s, const char *file, int line); void *dm_malloc_aux_debug(size_t s, const char *file, int line);
char *dm_strdup_aux(const char *str);
void dm_free_aux(void *p); void dm_free_aux(void *p);
void *dm_realloc_aux(void *p, unsigned int s, const char *file, int line); void *dm_realloc_aux(void *p, unsigned int s, const char *file, int line);
int dm_dump_memory_debug(void); int dm_dump_memory_debug(void);
@ -368,6 +367,7 @@ void dm_bounds_check_debug(void);
#ifdef DEBUG_MEM #ifdef DEBUG_MEM
# define dm_malloc(s) dm_malloc_aux_debug((s), __FILE__, __LINE__) # define dm_malloc(s) dm_malloc_aux_debug((s), __FILE__, __LINE__)
# define dm_strdup(s) dm_strdup_aux(s)
# define dm_free(p) dm_free_aux(p) # define dm_free(p) dm_free_aux(p)
# define dm_realloc(p, s) dm_realloc_aux(p, s, __FILE__, __LINE__) # define dm_realloc(p, s) dm_realloc_aux(p, s, __FILE__, __LINE__)
# define dm_dump_memory() dm_dump_memory_debug() # define dm_dump_memory() dm_dump_memory_debug()
@ -376,6 +376,7 @@ void dm_bounds_check_debug(void);
#else #else
# define dm_malloc(s) dm_malloc_aux((s), __FILE__, __LINE__) # define dm_malloc(s) dm_malloc_aux((s), __FILE__, __LINE__)
# define dm_strdup(s) strdup(s)
# define dm_free(p) free(p) # define dm_free(p) free(p)
# define dm_realloc(p, s) realloc(p, s) # define dm_realloc(p, s) realloc(p, s)
# define dm_dump_memory() {} # define dm_dump_memory() {}