From ea5ada919258d04e003596ee7079c33b5657dbdc Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 28 Jan 2011 21:46:39 -0800 Subject: inline Malloc & Realloc functions Since stdlib.h versions return void *, remove unneeded casts that the wrappers needed. Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau --- dsimple.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'dsimple.c') diff --git a/dsimple.c b/dsimple.c index 7c4b064..c052af4 100644 --- a/dsimple.c +++ b/dsimple.c @@ -58,30 +58,6 @@ char *program_name = "unknown_program"; Display *dpy = NULL; int screen = 0; -/* - * Malloc: like malloc but handles out of memory using Fatal_Error. - */ -char *Malloc(unsigned size) -{ - char *data; - - if (!(data = malloc(size))) - Fatal_Error("Out of memory!"); - - return(data); -} - -/* - * Realloc: like realloc but handles out of memory using Fatal_Error: - */ -char *Realloc(char *mem, unsigned size) -{ - if (!(mem = realloc (mem, size))) - Fatal_Error("Out of memory!"); - - return mem; -} - /* * Get_Display_Name (argc, argv) Look for -display, -d, or host:dpy (obselete) * If found, remove it from command line. Don't go past a lone -. -- cgit v1.2.3