From c161df4fee61819a28089682963cc2e721ca22c8 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 10 Aug 2013 23:51:08 -0700 Subject: Remove even more casts of return values from Xmalloc/Xrealloc Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/XDefaultOMIF.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'nx-X11/lib/X11/XDefaultOMIF.c') diff --git a/nx-X11/lib/X11/XDefaultOMIF.c b/nx-X11/lib/X11/XDefaultOMIF.c index a8faa2af1..71dc810eb 100644 --- a/nx-X11/lib/X11/XDefaultOMIF.c +++ b/nx-X11/lib/X11/XDefaultOMIF.c @@ -76,7 +76,7 @@ Sun Microsystems, Inc. or its licensors is granted. #define XOC_GENERIC(font_set) (&((XOCGeneric) font_set)->gen) #define DefineLocalBuf char local_buf[BUFSIZ] -#define AllocLocalBuf(length) (length > BUFSIZ ? (char *)Xmalloc(length) : local_buf) +#define AllocLocalBuf(length) (length > BUFSIZ ? Xmalloc(length) : local_buf) #define FreeLocalBuf(ptr) if (ptr != local_buf) Xfree(ptr) typedef struct _FontDataRec { @@ -332,15 +332,15 @@ init_core_part( if (count == 0) return False; - font_struct_list = (XFontStruct **) Xmalloc(sizeof(XFontStruct *)); + font_struct_list = Xmalloc(sizeof(XFontStruct *)); if (font_struct_list == NULL) return False; - font_name_list = (char **) Xmalloc(sizeof(char *)); + font_name_list = Xmalloc(sizeof(char *)); if (font_name_list == NULL) goto err; - font_name_buf = (char *) Xmalloc(length); + font_name_buf = Xmalloc(length); if (font_name_buf == NULL) goto err; @@ -578,11 +578,11 @@ set_missing_list( if (count == 0) return True; - charset_list = (char **) Xmalloc(sizeof(char *)); + charset_list = Xmalloc(sizeof(char *)); if (charset_list == NULL) return False; - charset_buf = (char *) Xmalloc(length); + charset_buf = Xmalloc(length); if (charset_buf == NULL) { Xfree(charset_list); return False; @@ -1172,11 +1172,11 @@ init_om( length += strlen(data->font_data->name) + 1; /* required charset list */ - required_list = (char **) Xmalloc(sizeof(char *)); + required_list = Xmalloc(sizeof(char *)); if (required_list == NULL) return False; - bufptr = (char *) Xmalloc(length); + bufptr = Xmalloc(length); if (bufptr == NULL) { Xfree(required_list); return False; @@ -1192,7 +1192,7 @@ init_om( bufptr += strlen(bufptr) + 1; /* orientation list */ - orientation = (XOrientation *) Xmalloc(sizeof(XOrientation)); + orientation = Xmalloc(sizeof(XOrientation)); if (orientation == NULL) return False; -- cgit v1.2.3