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/XDefaultIMIF.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/XDefaultIMIF.c')
-rw-r--r-- | nx-X11/lib/X11/XDefaultIMIF.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nx-X11/lib/X11/XDefaultIMIF.c b/nx-X11/lib/X11/XDefaultIMIF.c index e97d2f444..db0f5d1fa 100644 --- a/nx-X11/lib/X11/XDefaultIMIF.c +++ b/nx-X11/lib/X11/XDefaultIMIF.c @@ -184,10 +184,10 @@ _XDefaultOpenIM( return((XIM)NULL); } - if ((im = (StaticXIM)Xmalloc(sizeof(StaticXIMRec))) == (StaticXIM)NULL) { + if ((im = Xmalloc(sizeof(StaticXIMRec))) == (StaticXIM)NULL) { return((XIM)NULL); } - if ((local_impart = (XIMStaticXIMRec*)Xmalloc(sizeof(XIMStaticXIMRec))) + if ((local_impart = Xmalloc(sizeof(XIMStaticXIMRec))) == (XIMStaticXIMRec *)NULL) { Xfree(im); return((XIM)NULL); @@ -273,11 +273,11 @@ _GetIMValues( for (p = values; p->name != NULL; p++) { if (strcmp(p->name, XNQueryInputStyle) == 0) { - styles = (XIMStyles *)Xmalloc(sizeof(XIMStyles)); + styles = Xmalloc(sizeof(XIMStyles)); *(XIMStyles **)p->value = styles; styles->count_styles = 1; styles->supported_styles = - (XIMStyle*)Xmalloc(styles->count_styles * sizeof(XIMStyle)); + Xmalloc(styles->count_styles * sizeof(XIMStyle)); styles->supported_styles[0] = (XIMPreeditNone | XIMStatusNone); } else { break; @@ -344,7 +344,7 @@ _CreateIC(XIM im, XIMArg *arg) { XIC ic; - if ((ic = (XIC)Xmalloc(sizeof(XICRec))) == (XIC)NULL) { + if ((ic = Xmalloc(sizeof(XICRec))) == (XIC)NULL) { return ((XIC)NULL); } memset(ic, 0, sizeof(XICRec)); @@ -452,7 +452,7 @@ _WcLookupString( XComposeStatus NotSupportedYet ; int length; /* In single-byte, mb_len = wc_len */ - char *mb_buf = (char *)Xmalloc(wlen); + char *mb_buf = Xmalloc(wlen); length = XLookupString(ev, mb_buf, wlen, keysym, &NotSupportedYet); |