Xext: xres: brackets on if's
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-mingw32-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / xserver-build-freebsd (push) Waiting to run
Build X servers / xserver-build-dragonflybsd (push) Waiting to run
Build X servers / xserver-build-netbsd (push) Waiting to run
Build X servers / xserver-build-cygwin (push) Waiting to run
Build X servers / Check Signed-Off-By (push) Waiting to run
Build X servers / Release pushed tag (push) Blocked by required conditions
check PRs for merge conflicts / notify (push) Waiting to run

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2026-04-29 19:23:18 +02:00 • committed by Enrico Weigelt
commit b2c6474bfc

View file

@ -218,11 +218,10 @@ resourceTypeAtom(int i)
CARD32 ret;
const char *name = LookupResourceName(i);
if (strcmp(name, XREGISTRY_UNKNOWN))
if (strcmp(name, XREGISTRY_UNKNOWN)) {
ret = dixAddAtom(name);
else {
} else {
char buf[40];
snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1);
ret = dixAddAtom(buf);
}
@ -256,8 +255,9 @@ ProcXResQueryClientResources(ClientPtr client)
int num_types = 0;
for (int i = 0; i <= lastResourceType; i++) {
/* dont report currently unused resource types */
if (!(counts[i]))
if (!(counts[i])) {
continue;
}
/* write xXResType */
x_rpcbuf_write_CARD32(&rpcbuf, resourceTypeAtom(i + 1));
@ -383,8 +383,9 @@ ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
if (WillConstructMask(client, mask, ctx, X_XResLocalClientPIDMask)) {
pid_t pid = GetClientPid(client);
if (pid == -1)
if (pid == -1) {
return TRUE;
}
xXResClientIdValue reply = {
.spec.client = client->clientAsMask,
@ -424,8 +425,7 @@ ConstructClientIds(ClientPtr client,
{
for (int specIdx = 0; specIdx < numSpecs; ++specIdx) {
if (specs[specIdx].client == 0) {
int c;
for (c = 0; c < currentMaxClients; ++c) {
for (int c = 0; c < currentMaxClients; ++c) {
if (clients[c] &&
(dixCallClientAccessCallback(client, clients[c], DixReadAccess)
== Success)) {
@ -468,7 +468,7 @@ ProcXResQueryClientIds (ClientPtr client)
REQUEST_FIXED_SIZE(xXResQueryClientIdsReq,
(uint64_t)stuff->numSpecs * sizeof(xXResClientIdSpec));
xXResClientIdSpec *specs = (void*) ((char*) stuff + sizeof(xXResQueryClientIdsReq));
xXResClientIdSpec *specs = (void*) ((char*) stuff + sizeof(xXResQueryClientIdsReq));
if (client->swapped) {
/* each spec is made of two CARD32's */