summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-05-08 17:27:40 +0200
committerEnrico Weigelt, metux IT consult <info@metux.net>2024-05-08 17:27:40 +0200
commit0ebba9ea62fa5737e0e82f5b749afdd737dab58a (patch)
tree93de029cea58fe4696d894d9f441afbad755878b
parenta0da5b01a5f4628000ee40dc069e119caaca57e2 (diff)
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 <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-xgi/-/merge_requests/5>
-rw-r--r--src/xgi_accel.c2
-rw-r--r--src/xgi_dri.c2
-rw-r--r--src/xgi_driver.c8
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;