From 6fad884ce7c4767d2dd403ac8dfb8a6a107017ac Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 29 Jul 2024 13:25:06 +0200 Subject: [PATCH] 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 Part-of: --- randr/randr.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/randr/randr.c b/randr/randr.c index b314f0411..56fb453d2 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -315,7 +315,6 @@ RRScreenInit(ScreenPtr pScreen) /* * Calling function best set these function vectors */ - pScrPriv->rrGetInfo = 0; pScrPriv->maxWidth = pScrPriv->minWidth = pScreen->width; pScrPriv->maxHeight = pScrPriv->minHeight = pScreen->height; @@ -323,21 +322,11 @@ RRScreenInit(ScreenPtr pScreen) pScrPriv->height = pScreen->height; pScrPriv->mmWidth = pScreen->mmWidth; pScrPriv->mmHeight = pScreen->mmHeight; -#if RANDR_12_INTERFACE - pScrPriv->rrScreenSetSize = NULL; - pScrPriv->rrCrtcSet = NULL; - pScrPriv->rrCrtcSetGamma = NULL; -#endif #if RANDR_10_INTERFACE - pScrPriv->rrSetConfig = 0; pScrPriv->rotations = RR_Rotate_0; pScrPriv->reqWidth = pScreen->width; pScrPriv->reqHeight = pScreen->height; - pScrPriv->nSizes = 0; - pScrPriv->pSizes = NULL; pScrPriv->rotation = RR_Rotate_0; - pScrPriv->rate = 0; - pScrPriv->size = 0; #endif /* @@ -352,10 +341,6 @@ RRScreenInit(ScreenPtr pScreen) pScreen->ConstrainCursorHarder = RRConstrainCursorHarder; pScreen->ReplaceScanoutPixmap = RRReplaceScanoutPixmap; - pScrPriv->numOutputs = 0; - pScrPriv->outputs = NULL; - pScrPriv->numCrtcs = 0; - pScrPriv->crtcs = NULL; xorg_list_init(&pScrPriv->leases);