aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xres.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/xres.c')
-rw-r--r--xorg-server/Xext/xres.c78
1 files changed, 36 insertions, 42 deletions
diff --git a/xorg-server/Xext/xres.c b/xorg-server/Xext/xres.c
index 445abcab8..cac2e12ab 100644
--- a/xorg-server/Xext/xres.c
+++ b/xorg-server/Xext/xres.c
@@ -120,7 +120,7 @@ AddFragment(struct xorg_list *frags, int bytes)
static void
WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags)
{
- FragmentList *it;
+ FragmentList *it=NULL;
xorg_list_for_each_entry(it, frags, l) {
WriteToClient(client, it->bytes, (char*) it + sizeof(*it));
}
@@ -133,7 +133,7 @@ WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags)
static void
DestroyFragments(struct xorg_list *frags)
{
- FragmentList *it, *tmp;
+ FragmentList *it=NULL, *tmp;
xorg_list_for_each_entry_safe(it, tmp, frags, l) {
xorg_list_del(&it->l);
free(it);
@@ -194,16 +194,15 @@ static int
ProcXResQueryVersion(ClientPtr client)
{
REQUEST(xXResQueryVersionReq);
- xXResQueryVersionReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .server_major = SERVER_XRES_MAJOR_VERSION,
- .server_minor = SERVER_XRES_MINOR_VERSION
- };
+ xXResQueryVersionReply rep;
REQUEST_SIZE_MATCH(xXResQueryVersionReq);
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.server_major = SERVER_XRES_MAJOR_VERSION;
+ rep.server_minor = SERVER_XRES_MINOR_VERSION;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -234,12 +233,11 @@ ProcXResQueryClients(ClientPtr client)
}
}
- rep = (xXResQueryClientsReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = bytes_to_int32(num_clients * sz_xXResClient),
- .num_clients = num_clients
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = bytes_to_int32(num_clients * sz_xXResClient);
+ rep.num_clients = num_clients;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -303,12 +301,11 @@ ProcXResQueryClientResources(ClientPtr client)
num_types++;
}
- rep = (xXResQueryClientResourcesReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = bytes_to_int32(num_types * sz_xXResType),
- .num_types = num_types
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = bytes_to_int32(num_types * sz_xXResType);
+ rep.num_types = num_types;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -475,17 +472,16 @@ ProcXResQueryClientPixmapBytes(ClientPtr client)
(pointer)(&bytes));
#endif
- rep = (xXResQueryClientPixmapBytesReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .bytes = bytes,
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.bytes = bytes;
#ifdef _XSERVER64
- .bytes_overflow = bytes >> 32
+ rep.bytes_overflow = bytes >> 32;
#else
- .bytes_overflow = 0
+ rep.bytes_overflow = 0;
#endif
- };
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -670,12 +666,11 @@ ProcXResQueryClientIds (ClientPtr client)
rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx);
if (rc == Success) {
- xXResQueryClientIdsReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = bytes_to_int32(ctx.resultBytes),
- .numIds = ctx.numIds
- };
+ xXResQueryClientIdsReply rep;
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = bytes_to_int32(ctx.resultBytes);
+ rep.numIds = ctx.numIds;
assert((ctx.resultBytes & 3) == 0);
@@ -827,7 +822,7 @@ AddResourceSizeValue(pointer ptr, XID id, RESTYPE type, pointer cdata)
Bool ok = TRUE;
HashTable ht;
HtGenericHashSetupRec htSetup = {
- .keySize = sizeof(void*)
+ /*.keySize = */sizeof(void*)
};
/* it doesn't matter that we don't undo the work done here
@@ -1053,12 +1048,11 @@ ProcXResQueryResourceBytes (ClientPtr client)
rc = ConstructResourceBytes(stuff->client, &ctx);
if (rc == Success) {
- xXResQueryResourceBytesReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = bytes_to_int32(ctx.resultBytes),
- .numSizes = ctx.numSizes
- };
+ xXResQueryResourceBytesReply rep;
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = bytes_to_int32(ctx.resultBytes);
+ rep.numSizes = ctx.numSizes;
if (client->swapped) {
swaps (&rep.sequenceNumber);