Don't cast the return value of malloc/realloc
[mesa.git] / src / glx / glx_query.c
index bbc2b79d83d78a763e17c23405d699c6fb98017f..8a7ca53f5d285ffb522bed75005d44782510c165 100644 (file)
@@ -146,7 +146,7 @@ __glXGetStringFromServer(Display * dpy, int opcode, CARD32 glxCode,
    length = reply.length * 4;
    numbytes = reply.size;
 
-   buf = (char *) malloc(numbytes);
+   buf = malloc(numbytes);
    if (buf != NULL) {
       _XRead(dpy, buf, numbytes);
       length -= numbytes;