Xext: xv: ProcXvQueryEncodings(): declare variables where assigned first

For easier understanding the code, declare the variables right where
they're assigned first.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-07-17 21:02:37 +02:00
committed by Enrico Weigelt
parent 75f2b2334d
commit aef132f847

View File

@@ -183,19 +183,16 @@ ProcXvQueryAdaptors(ClientPtr client)
static int
ProcXvQueryEncodings(ClientPtr client)
{
XvPortPtr pPort;
int ne;
XvEncodingPtr pe;
REQUEST(xvQueryEncodingsReq);
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
XvPortPtr pPort;
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };
ne = pPort->pAdaptor->nEncodings;
pe = pPort->pAdaptor->pEncodings;
size_t ne = pPort->pAdaptor->nEncodings;
XvEncodingPtr pe = pPort->pAdaptor->pEncodings;
while (ne--) {
size_t nameSize = strlen(pe->name);