diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-10 23:51:08 -0700 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:28 +0200 |
commit | c161df4fee61819a28089682963cc2e721ca22c8 (patch) | |
tree | 00c3f8e2c0aba620b35cc7301acef494898a9542 /nx-X11/lib/X11/omGeneric.c | |
parent | 5d6cda4f6442c524db3c52b272f7ff5f7225bec6 (diff) | |
download | nx-libs-c161df4fee61819a28089682963cc2e721ca22c8.tar.gz nx-libs-c161df4fee61819a28089682963cc2e721ca22c8.tar.bz2 nx-libs-c161df4fee61819a28089682963cc2e721ca22c8.zip |
Remove even more casts of return values from Xmalloc/Xrealloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/omGeneric.c')
-rw-r--r-- | nx-X11/lib/X11/omGeneric.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/nx-X11/lib/X11/omGeneric.c b/nx-X11/lib/X11/omGeneric.c index 2c5e8dd06..24d5a902e 100644 --- a/nx-X11/lib/X11/omGeneric.c +++ b/nx-X11/lib/X11/omGeneric.c @@ -101,7 +101,7 @@ init_fontdata( FontData fd; int i; - fd = (FontData)Xmalloc(sizeof(FontDataRec) * font_data_count); + fd = Xmalloc(sizeof(FontDataRec) * font_data_count); if(fd == (FontData) NULL) return False; @@ -126,7 +126,7 @@ init_vrotate( if(type == VROTATE_NONE) return (VRotate)NULL; - vrotate = (VRotate)Xmalloc(sizeof(VRotateRec) * font_data_count); + vrotate = Xmalloc(sizeof(VRotateRec) * font_data_count); if(vrotate == (VRotate) NULL) return False; @@ -155,7 +155,7 @@ init_fontset( count = XOM_GENERIC(oc->core.om)->data_num; data = XOM_GENERIC(oc->core.om)->data; - font_set = (FontSet) Xmalloc(sizeof(FontSetRec) * count); + font_set = Xmalloc(sizeof(FontSetRec) * count); if (font_set == NULL) return False; memset((char *) font_set, 0x00, sizeof(FontSetRec) * count); @@ -463,15 +463,15 @@ init_core_part( if (count == 0) return False; - font_struct_list = (XFontStruct **) Xmalloc(sizeof(XFontStruct *) * count); + font_struct_list = Xmalloc(sizeof(XFontStruct *) * count); if (font_struct_list == NULL) return False; - font_name_list = (char **) Xmalloc(sizeof(char *) * count); + font_name_list = Xmalloc(sizeof(char *) * count); 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; @@ -603,7 +603,7 @@ get_rotate_fontname( if (len > XLFD_MAX_LEN) goto free_pattern; - rotate_font_ptr = (char *)Xmalloc(len + 1); + rotate_font_ptr = Xmalloc(len + 1); if(!rotate_font_ptr) goto free_pattern; @@ -1098,7 +1098,7 @@ parse_vw( Xfree(vrotate); if(sub_num > 0) { - vrotate = font_set->vrotate = (VRotate)Xmalloc + vrotate = font_set->vrotate = Xmalloc (sizeof(VRotateRec) * sub_num); if(font_set->vrotate == (VRotate)NULL) return (-1); @@ -1288,12 +1288,12 @@ set_missing_list( return True; } - charset_list = (char **) Xmalloc(sizeof(char *) * count); + charset_list = Xmalloc(sizeof(char *) * count); if (charset_list == NULL) { return False; } - charset_buf = (char *) Xmalloc(length); + charset_buf = Xmalloc(length); if (charset_buf == NULL) { Xfree(charset_list); return False; @@ -1869,9 +1869,9 @@ add_data( int num; if ((num = gen->data_num)) - new = (OMData) Xrealloc(gen->data, (num + 1) * sizeof(OMDataRec)); + new = Xrealloc(gen->data, (num + 1) * sizeof(OMDataRec)); else - new = (OMData) Xmalloc(sizeof(OMDataRec)); + new = Xmalloc(sizeof(OMDataRec)); if (new == NULL) return NULL; @@ -1910,7 +1910,7 @@ read_EncodingInfo( bufptr++ ; } else len = strlen(buf); - font_data->name = (char *) Xmalloc(len + 1); + font_data->name = Xmalloc(len + 1); if (font_data->name == NULL) { Xfree(font_data); return NULL; @@ -2019,7 +2019,7 @@ init_om( if (data == NULL) return False; - charset_list = (XlcCharSet *) Xmalloc(sizeof(XlcCharSet) * count); + charset_list = Xmalloc(sizeof(XlcCharSet) * count); if (charset_list == NULL) return False; data->charset_list = charset_list; @@ -2033,7 +2033,7 @@ init_om( if( count > 0){ UDCArea udc; int i,flag = 0; - udc = (UDCArea)Xmalloc(count * sizeof(UDCAreaRec)); + udc = Xmalloc(count * sizeof(UDCAreaRec)); if (udc == NULL) return False; for(i=0;i<count;i++){ @@ -2093,7 +2093,7 @@ init_om( } /* required charset list */ - required_list = (char **) Xmalloc(sizeof(char *) * gen->data_num); + required_list = Xmalloc(sizeof(char *) * gen->data_num); if (required_list == NULL) return False; @@ -2104,7 +2104,7 @@ init_om( data = gen->data; if (count > 0) { - bufptr = (char *) Xmalloc(length); + bufptr = Xmalloc(length); if (bufptr == NULL) { Xfree(required_list); return False; @@ -2118,7 +2118,7 @@ init_om( } /* orientation list */ - orientation = (XOrientation *) Xmalloc(sizeof(XOrientation) * 2); + orientation = Xmalloc(sizeof(XOrientation) * 2); if (orientation == NULL) return False; |