summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-05-08 16:03:28 +0200
committerEnrico Weigelt, metux IT consult <info@metux.net>2024-05-08 16:03:28 +0200
commitbae05c30a729c97f9d45943581299459a8c62e4d (patch)
tree0f9685efb454663b620fb18727b5318ac2beb8a9
parent76760525c13b5d659e4a28fb08e89de46ce09e11 (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-mach64/-/merge_requests/13>
-rw-r--r--src/atidri.c4
-rw-r--r--src/atii2c.c2
-rw-r--r--src/atimach64i2c.c2
-rw-r--r--src/atipreinit.c4
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;