From aef132f847d2f665b525ffc674554d431a615967 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 17 Jul 2025 21:02:37 +0200 Subject: [PATCH] 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 --- Xext/xvdisp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 15d266a13..1c94b5521 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -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);