From bae05c30a729c97f9d45943581299459a8c62e4d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 16:03:28 +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/atidri.c | 4 ++-- src/atii2c.c | 2 +- src/atimach64i2c.c | 2 +- src/atipreinit.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/atidri.c b/src/atidri.c index b6efe66..35cbb99 100644 --- a/src/atidri.c +++ b/src/atidri.c @@ -1063,7 +1063,7 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen ) (unsigned)(sizeof(XF86DRISAREARec) + sizeof(ATISAREAPrivRec)) ); pDRIInfo->SAREASize = SAREA_MAX; - pATIDRI = (ATIDRIPtr) xnfcalloc( sizeof(ATIDRIRec), 1 ); + pATIDRI = (ATIDRIPtr) XNFcallocarray( sizeof(ATIDRIRec), 1 ); if ( !pATIDRI ) { DRIDestroyInfoRec( pATI->pDRIInfo ); pATI->pDRIInfo = NULL; @@ -1072,7 +1072,7 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen ) return FALSE; } pATIDRIServer = (ATIDRIServerInfoPtr) - xnfcalloc( sizeof(ATIDRIServerInfoRec), 1 ); + XNFcallocarray( sizeof(ATIDRIServerInfoRec), 1 ); if ( !pATIDRIServer ) { free( pATIDRI ); DRIDestroyInfoRec( pATI->pDRIInfo ); diff --git a/src/atii2c.c b/src/atii2c.c index a0fa050..7ede076 100644 --- a/src/atii2c.c +++ b/src/atii2c.c @@ -318,7 +318,7 @@ ATICreateI2CBusRec ) { I2CBusPtr pI2CBus; - ATII2CPtr pATII2C = xnfcalloc(1, SizeOf(ATII2CRec)); + ATII2CPtr pATII2C = XNFcallocarray(1, SizeOf(ATII2CRec)); if (!(pI2CBus = xf86CreateI2CBusRec())) { diff --git a/src/atimach64i2c.c b/src/atimach64i2c.c index 60d9e92..48ca078 100644 --- a/src/atimach64i2c.c +++ b/src/atimach64i2c.c @@ -296,7 +296,7 @@ ATITVAddOnProbe I2CBusPtr pI2CBus ) { - I2CDevPtr pI2CDev = xnfcalloc(1, SizeOf(I2CDevRec)); + I2CDevPtr pI2CDev = XNFcallocarray(1, SizeOf(I2CDevRec)); static const CARD8 ATITVAddOnAddresses[] = {0x70, 0x40, 0x78, 0x72, 0x42}; diff --git a/src/atipreinit.c b/src/atipreinit.c index 96ec68f..7281f19 100644 --- a/src/atipreinit.c +++ b/src/atipreinit.c @@ -63,7 +63,7 @@ static Bool Mach64GetRec(ScrnInfoPtr pScrn) { if (!pScrn->driverPrivate) { - pScrn->driverPrivate = xnfcalloc(sizeof(ATIRec), 1); + pScrn->driverPrivate = XNFcallocarray(sizeof(ATIRec), 1); memset(pScrn->driverPrivate, 0, sizeof(ATIRec)); } @@ -2302,7 +2302,7 @@ ATIPreInit * Add a mode to the end of the monitor's list for the panel's * native resolution. */ - pMode = (DisplayModePtr)xnfcalloc(1, SizeOf(DisplayModeRec)); + pMode = (DisplayModePtr)XNFcallocarray(1, SizeOf(DisplayModeRec)); pMode->name = "Native panel mode"; pMode->type = M_T_BUILTIN; pMode->Clock = pATI->LCDClock; -- cgit v1.2.3