mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
render: ProcRenderQueryPictFormats(): scope pFormat variable
instead of reusing one variable for different things, put it into local scopes, so things can't ever get mixed up. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
8237dacffe
commit
60dc405def
@@ -308,7 +308,6 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
VisualPtr pVisual;
|
||||
DepthPtr pDepth;
|
||||
int v, d;
|
||||
PictFormatPtr pFormat;
|
||||
int nformat;
|
||||
int ndepth;
|
||||
int nvisual;
|
||||
@@ -376,6 +375,7 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(walkScreen);
|
||||
if (ps) {
|
||||
size_t idx;
|
||||
PictFormatPtr pFormat;
|
||||
for (idx = 0, pFormat = ps->formats;
|
||||
idx < ps->nformats; idx++, pFormat++) {
|
||||
pictForm->id = pFormat->id;
|
||||
@@ -421,6 +421,8 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
pDepth = walkScreen->allowedDepths + d;
|
||||
pictDepth->nPictVisuals = 0; /* counting in here */
|
||||
for (v = 0; v < pDepth->numVids; v++) {
|
||||
PictFormatPtr pFormat;
|
||||
|
||||
pVisual = findVisual(walkScreen, pDepth->vids[v]);
|
||||
if (pVisual && (pFormat = PictureMatchVisual(walkScreen,
|
||||
pDepth->depth,
|
||||
|
||||
Reference in New Issue
Block a user