From e15023b2ad2a5ca8742cbb93fe10cb38ab079831 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 7 Mar 2013 23:46:05 -0800 Subject: Remove more unnecessary casts from Xmalloc/calloc calls Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/GetAtomNm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nx-X11/lib/X11/GetAtomNm.c') diff --git a/nx-X11/lib/X11/GetAtomNm.c b/nx-X11/lib/X11/GetAtomNm.c index 996f7ebf9..32de50d23 100644 --- a/nx-X11/lib/X11/GetAtomNm.c +++ b/nx-X11/lib/X11/GetAtomNm.c @@ -46,7 +46,7 @@ char *_XGetAtomName( for (idx = TABLESIZE; --idx >= 0; ) { if ((e = *table++) && (e->atom == atom)) { idx = strlen(EntryName(e)) + 1; - if ((name = (char *)Xmalloc(idx))) + if ((name = Xmalloc(idx))) strcpy(name, EntryName(e)); return name; } @@ -73,7 +73,7 @@ char *XGetAtomName( SyncHandle(); return(NULL); } - if ((name = (char *) Xmalloc(rep.nameLength+1))) { + if ((name = Xmalloc(rep.nameLength + 1))) { _XReadPad(dpy, name, (long)rep.nameLength); name[rep.nameLength] = '\0'; _XUpdateAtomCache(dpy, name, atom, 0, -1, 0); @@ -124,7 +124,7 @@ Bool _XGetAtomNameHandler( _XGetAsyncReply(dpy, (char *)&replbuf, rep, buf, len, (SIZEOF(xGetAtomNameReply) - SIZEOF(xReply)) >> 2, False); - state->names[state->idx] = (char *) Xmalloc(repl->nameLength+1); + state->names[state->idx] = Xmalloc(repl->nameLength + 1); _XGetAsyncData(dpy, state->names[state->idx], buf, len, SIZEOF(xGetAtomNameReply), repl->nameLength, repl->length << 2); @@ -170,7 +170,7 @@ XGetAtomNames ( } if (missed >= 0) { if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - if ((names_return[missed] = (char *) Xmalloc(rep.nameLength+1))) { + if ((names_return[missed] = Xmalloc(rep.nameLength + 1))) { _XReadPad(dpy, names_return[missed], (long)rep.nameLength); names_return[missed][rep.nameLength] = '\0'; _XUpdateAtomCache(dpy, names_return[missed], atoms[missed], -- cgit v1.2.3