Commit fe39d8a3 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXshm.c: slight simplification

parent b65dd4e3
......@@ -190,9 +190,6 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
char *data;
{
#ifdef NXAGENT_SERVER
int length;
char *newdata;
#ifdef TEST
fprintf(stderr, "fbShmPutImage: Called with drawable at [%p] GC at [%p] data at [%p].\n",
(void *) dst, (void *) pGC, (void *) data);
......@@ -227,9 +224,9 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
sx, sy, sw, sh, dx);
#endif
length = nxagentImageLength(sw, sh, format, 0, depth);
char *newdata = calloc(1, nxagentImageLength(sw, sh, format, 0, depth));
if ((newdata = calloc(1, length)) != NULL)
if (newdata != NULL)
{
fbGetImage((DrawablePtr) pPixmap, sx, sy, sw, sh, format, AllPlanes, newdata);
(*pGC->ops->PutImage)(dst, pGC, depth, dx, dy, sw, sh, 0, format, newdata);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment