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/lcRM.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/lib/X11/lcRM.c') diff --git a/nx-X11/lib/X11/lcRM.c b/nx-X11/lib/X11/lcRM.c index 9f72504ee..aec93a2a3 100644 --- a/nx-X11/lib/X11/lcRM.c +++ b/nx-X11/lib/X11/lcRM.c @@ -197,7 +197,7 @@ _XrmDefaultInitParseInfo( { if (XLC_PUBLIC(lcd, mb_cur_max) == 1) { /* Unibyte case. */ - UbState state = (UbState) Xmalloc(sizeof(UbStateRec)); + UbState state = Xmalloc(sizeof(UbStateRec)); if (state == NULL) return (XrmMethods) NULL; @@ -207,7 +207,7 @@ _XrmDefaultInitParseInfo( return &ub_methods; } else { /* Multibyte case. */ - MbState state = (MbState) Xmalloc(sizeof(MbStateRec)); + MbState state = Xmalloc(sizeof(MbStateRec)); if (state == NULL) return (XrmMethods) NULL; -- cgit v1.2.3 From 26256188b498e122e21ce0e05521dfc58f8b60a5 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 11 Aug 2013 00:07:33 -0700 Subject: Remove unnecessary casts of pointers to (char *) in calls to Xfree() Left one cast behind that is necessary to change from const char * to char * in nx-X11/lib/X11/lcCharSet.c. Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/lcRM.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nx-X11/lib/X11/lcRM.c') diff --git a/nx-X11/lib/X11/lcRM.c b/nx-X11/lib/X11/lcRM.c index aec93a2a3..bdc20f21d 100644 --- a/nx-X11/lib/X11/lcRM.c +++ b/nx-X11/lib/X11/lcRM.c @@ -85,7 +85,7 @@ ub_destroy( XPointer state) { _XCloseLC(((UbState) state)->lcd); - Xfree((char *) state); + Xfree(state); } static const XrmMethodsRec ub_methods = { @@ -177,7 +177,7 @@ mb_destroy( { _XlcCloseConverter(((MbState) state)->conv); _XCloseLC(((MbState) state)->lcd); - Xfree((char *) state); + Xfree(state); } static const XrmMethodsRec mb_methods = { @@ -214,7 +214,7 @@ _XrmDefaultInitParseInfo( state->lcd = lcd; state->conv = _XlcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar); if (state->conv == NULL) { - Xfree((char *) state); + Xfree(state); return (XrmMethods) NULL; } -- cgit v1.2.3