mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
dri2: declare variables when needed in find_attachment()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
24f0d145e1
commit
3cd1e0865d
@@ -484,13 +484,11 @@ destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, int prime_id)
|
||||
static int
|
||||
find_attachment(DRI2DrawablePtr pPriv, unsigned attachment)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (pPriv->buffers == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < pPriv->bufferCount; i++) {
|
||||
for (int i = 0; i < pPriv->bufferCount; i++) {
|
||||
if ((pPriv->buffers[i] != NULL)
|
||||
&& (pPriv->buffers[i]->attachment == attachment)) {
|
||||
return i;
|
||||
|
||||
Reference in New Issue
Block a user