From ad1ea7f47cb37212105e910db8c71ba5525cd8b9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 29 Jul 2008 15:23:11 -0700 Subject: Turn my_wrappers into macros The my_malloc() etc wrappers can be shrunk by using macros. --- src/cli_new.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/cli_new.c') diff --git a/src/cli_new.c b/src/cli_new.c index c1f5aac..83cc150 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -2074,35 +2074,7 @@ int cli_val_read(char *buf, int max_size) } return len; } -/*==========================================================*/ -/* MEMORY */ -/*==========================================================*/ - -void *my_malloc(size_t size, const char *name) -{ - return malloc(size); -} -void *my_realloc(void *ptr, size_t size, const char *name) -{ - return realloc(ptr, size); -} - -void my_free(void *ptr) -{ - free(ptr); -} - -/************************************************* - my_strdup: - do a strdup, - exit on no memory -**************************************************/ -char *my_strdup(const char *s, const char *name) -{ - return strdup(s); -} - -void done() +void done(void) { free_reuse_list(); free_path(&t_path); -- cgit v1.2.3