aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/render')
-rw-r--r--xorg-server/render/glyph.c2
-rw-r--r--xorg-server/render/picturestr.h2
-rw-r--r--xorg-server/render/render.c23
3 files changed, 12 insertions, 15 deletions
diff --git a/xorg-server/render/glyph.c b/xorg-server/render/glyph.c
index c121e64a2..e1dc66291 100644
--- a/xorg-server/render/glyph.c
+++ b/xorg-server/render/glyph.c
@@ -80,8 +80,6 @@ static GlyphHashSetRec glyphHashSets[] = {
#define NGLYPHHASHSETS (sizeof(glyphHashSets)/sizeof(glyphHashSets[0]))
-static const CARD8 glyphDepths[GlyphFormatNum] = { 1, 4, 8, 16, 32 };
-
static GlyphHashRec globalGlyphs[GlyphFormatNum];
void
diff --git a/xorg-server/render/picturestr.h b/xorg-server/render/picturestr.h
index 1cda88a80..dc00f41ff 100644
--- a/xorg-server/render/picturestr.h
+++ b/xorg-server/render/picturestr.h
@@ -547,8 +547,6 @@ CompositeTriFan(CARD8 op,
PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
-extern _X_EXPORT void RenderExtensionInit(void);
-
Bool
AnimCurInit(ScreenPtr pScreen);
diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c
index fe7666d35..51f75ae7e 100644
--- a/xorg-server/render/render.c
+++ b/xorg-server/render/render.c
@@ -37,6 +37,7 @@
#include "pixmapstr.h"
#include "colormapst.h"
#include "extnsionst.h"
+#include "extinit.h"
#include "servermd.h"
#include <X11/extensions/render.h>
#include <X11/extensions/renderproto.h>
@@ -267,7 +268,11 @@ static int
ProcRenderQueryVersion(ClientPtr client)
{
RenderClientPtr pRenderClient = GetRenderClient(client);
- xRenderQueryVersionReply rep;
+ xRenderQueryVersionReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
REQUEST(xRenderQueryVersionReq);
@@ -275,10 +280,6 @@ ProcRenderQueryVersion(ClientPtr client)
pRenderClient->minor_version = stuff->minorVersion;
REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
- memset(&rep, 0, sizeof(xRenderQueryVersionReply));
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
(SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION)) {
@@ -296,7 +297,7 @@ ProcRenderQueryVersion(ClientPtr client)
swapl(&rep.majorVersion);
swapl(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xRenderQueryVersionReply), &rep);
return Success;
}
@@ -500,7 +501,7 @@ ProcRenderQueryPictFormats(ClientPtr client)
swapl(&reply->numVisuals);
swapl(&reply->numSubpixel);
}
- WriteToClient(client, rlength, (char *) reply);
+ WriteToClient(client, rlength, reply);
free(reply);
return Success;
}
@@ -531,7 +532,7 @@ ProcRenderQueryPictIndexValues(ClientPtr client)
num = pFormat->index.nvalues;
rlength = (sizeof(xRenderQueryPictIndexValuesReply) +
num * sizeof(xIndexValue));
- reply = (xRenderQueryPictIndexValuesReply *) malloc(rlength);
+ reply = (xRenderQueryPictIndexValuesReply *) calloc(1, rlength);
if (!reply)
return BadAlloc;
@@ -557,7 +558,7 @@ ProcRenderQueryPictIndexValues(ClientPtr client)
swapl(&reply->numIndexValues);
}
- WriteToClient(client, rlength, (char *) reply);
+ WriteToClient(client, rlength, reply);
free(reply);
return Success;
}
@@ -1688,7 +1689,7 @@ ProcRenderQueryFilters(ClientPtr client)
}
len = ((nnames + 1) >> 1) + bytes_to_int32(nbytesName);
total_bytes = sizeof(xRenderQueryFiltersReply) + (len << 2);
- reply = (xRenderQueryFiltersReply *) malloc(total_bytes);
+ reply = (xRenderQueryFiltersReply *) calloc(1, total_bytes);
if (!reply)
return BadAlloc;
aliases = (INT16 *) (reply + 1);
@@ -1748,7 +1749,7 @@ ProcRenderQueryFilters(ClientPtr client)
swapl(&reply->numAliases);
swapl(&reply->numFilters);
}
- WriteToClient(client, total_bytes, (char *) reply);
+ WriteToClient(client, total_bytes, reply);
free(reply);
return Success;