From 0ebba9ea62fa5737e0e82f5b749afdd737dab58a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 17:27:40 +0200 Subject: use XNFcallocarray() instead of xnfcalloc macro xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- src/xgi_accel.c | 2 +- src/xgi_dri.c | 2 +- src/xgi_driver.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xgi_accel.c b/src/xgi_accel.c index d3cece5..997d273 100644 --- a/src/xgi_accel.c +++ b/src/xgi_accel.c @@ -713,7 +713,7 @@ Volari_AccelInit(ScreenPtr pScreen) #ifdef XGIISXORGPOST70 /* for Xorg 7.0 and above */ if(!(pXGI->EXADriverPtr = exaDriverAlloc())) #else - if(!(pXGI->EXADriverPtr = xnfcalloc(sizeof(ExaDriverRec), 1))) + if(!(pXGI->EXADriverPtr = XNFcallocarray(sizeof(ExaDriverRec), 1))) #endif { ErrorF("Failed to allocate EXADriverPtr!\n"); diff --git a/src/xgi_dri.c b/src/xgi_dri.c index 820d0e7..4af3c73 100644 --- a/src/xgi_dri.c +++ b/src/xgi_dri.c @@ -179,7 +179,7 @@ Bool XGIDRIScreenInit(ScreenPtr pScreen) pDRIInfo->SAREASize = SAREA_MAX; #endif - if (!(pXGIDRI = (XGIDRIPtr)xnfcalloc(sizeof(XGIDRIRec),1))) { + if (!(pXGIDRI = (XGIDRIPtr)XNFcallocarray(sizeof(XGIDRIRec),1))) { DRIDestroyInfoRec(pXGI->pDRIInfo); pXGI->pDRIInfo=0; return FALSE; diff --git a/src/xgi_driver.c b/src/xgi_driver.c index e91d957..51a0c9d 100644 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -387,7 +387,7 @@ XGIGetRec(ScrnInfoPtr pScrn) * the allocation has already been done. */ if (pScrn->driverPrivate == NULL) { - XGIPtr pXGI = xnfcalloc(sizeof(XGIRec), 1); + XGIPtr pXGI = XNFcallocarray(sizeof(XGIRec), 1); /* Initialise it to 0 */ memset(pXGI, 0, sizeof(XGIRec)); @@ -672,7 +672,7 @@ void XGIAddAvailableModes(DisplayModePtr availModes) /* Add all modes of ExtraAvailableModeTiming[] */ for(i=0; /* i < ExtraAvailableModeTimingCount */ xf86NameCmp(ExtraAvailableModeTiming[i].name, "0x0") != 0 ; i++) { - p = xnfcalloc(1, sizeof(DisplayModeRec)); + p = XNFcallocarray(1, sizeof(DisplayModeRec)); p->prev = last; p->next = NULL; @@ -2873,7 +2873,7 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags) } if (!pXGI->XGI_Pr) { - if (!(pXGI->XGI_Pr = xnfcalloc(sizeof(VB_DEVICE_INFO), 1))) { + if (!(pXGI->XGI_Pr = XNFcallocarray(sizeof(VB_DEVICE_INFO), 1))) { XGIErrorLog(pScrn, "Could not allocate memory for XGI_Pr private\n"); @@ -3642,7 +3642,7 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags) * Setup the ClockRanges, which describe what clock ranges are available, * and what sort of modes they can be used for. */ - clockRanges = xnfcalloc(sizeof(ClockRange), 1); + clockRanges = XNFcallocarray(sizeof(ClockRange), 1); clockRanges->next = NULL; clockRanges->minClock = pXGI->MinClock; clockRanges->maxClock = pXGI->MaxClock; -- cgit v1.2.3