dri2: fix declaration after label error (*BSD)

BSD compilers dont like declarations directly following labels
(eg. within a switch/case statement), thus we need to scrope those.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-02-10 17:15:12 +01:00
committed by Enrico Weigelt
parent 673ad0822b
commit 54c996274f

View File

@@ -203,11 +203,15 @@ DRI2GetDrawable(DrawablePtr pDraw)
{
switch (pDraw->type) {
case DRAWABLE_WINDOW:
{
WindowPtr pWin = (WindowPtr) pDraw;
return dixLookupPrivate(&pWin->devPrivates, &dri2WindowPrivateKeyRec);
}
case DRAWABLE_PIXMAP:
{
PixmapPtr pPixmap = (PixmapPtr) pDraw;
return dixLookupPrivate(&pPixmap->devPrivates, &dri2PixmapPrivateKeyRec);
}
default:
return NULL;
}