randr: RRScreenInit(): drop unnecessary zero'ing

The whole struct is already allocated by calloc(), so no need to explicitly
zero-out individual fields.

Fixes: 479b2be4ba - Clear allocated RandR screen private structure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1794>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-07-29 13:25:06 +02:00 committed by Marge Bot
parent 73467faeb2
commit 6fad884ce7

View File

@ -315,7 +315,6 @@ RRScreenInit(ScreenPtr pScreen)
/* /*
* Calling function best set these function vectors * Calling function best set these function vectors
*/ */
pScrPriv->rrGetInfo = 0;
pScrPriv->maxWidth = pScrPriv->minWidth = pScreen->width; pScrPriv->maxWidth = pScrPriv->minWidth = pScreen->width;
pScrPriv->maxHeight = pScrPriv->minHeight = pScreen->height; pScrPriv->maxHeight = pScrPriv->minHeight = pScreen->height;
@ -323,21 +322,11 @@ RRScreenInit(ScreenPtr pScreen)
pScrPriv->height = pScreen->height; pScrPriv->height = pScreen->height;
pScrPriv->mmWidth = pScreen->mmWidth; pScrPriv->mmWidth = pScreen->mmWidth;
pScrPriv->mmHeight = pScreen->mmHeight; pScrPriv->mmHeight = pScreen->mmHeight;
#if RANDR_12_INTERFACE
pScrPriv->rrScreenSetSize = NULL;
pScrPriv->rrCrtcSet = NULL;
pScrPriv->rrCrtcSetGamma = NULL;
#endif
#if RANDR_10_INTERFACE #if RANDR_10_INTERFACE
pScrPriv->rrSetConfig = 0;
pScrPriv->rotations = RR_Rotate_0; pScrPriv->rotations = RR_Rotate_0;
pScrPriv->reqWidth = pScreen->width; pScrPriv->reqWidth = pScreen->width;
pScrPriv->reqHeight = pScreen->height; pScrPriv->reqHeight = pScreen->height;
pScrPriv->nSizes = 0;
pScrPriv->pSizes = NULL;
pScrPriv->rotation = RR_Rotate_0; pScrPriv->rotation = RR_Rotate_0;
pScrPriv->rate = 0;
pScrPriv->size = 0;
#endif #endif
/* /*
@ -352,10 +341,6 @@ RRScreenInit(ScreenPtr pScreen)
pScreen->ConstrainCursorHarder = RRConstrainCursorHarder; pScreen->ConstrainCursorHarder = RRConstrainCursorHarder;
pScreen->ReplaceScanoutPixmap = RRReplaceScanoutPixmap; pScreen->ReplaceScanoutPixmap = RRReplaceScanoutPixmap;
pScrPriv->numOutputs = 0;
pScrPriv->outputs = NULL;
pScrPriv->numCrtcs = 0;
pScrPriv->crtcs = NULL;
xorg_list_init(&pScrPriv->leases); xorg_list_init(&pScrPriv->leases);