diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-05-08 16:22:38 +0200 |
---|---|---|
committer | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-05-08 16:22:38 +0200 |
commit | fd20c34e7ac7be738a07bbef08b5d4b7e13bd4b7 (patch) | |
tree | ffa11d7b7966aa4254378c4ec983647b568bbe1d /src | |
parent | dd4a6d596bd66169c21b3669832aed71eda9838e (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-nv/-/merge_requests/18>
Diffstat (limited to 'src')
-rw-r--r-- | src/g80_dac.c | 2 | ||||
-rw-r--r-- | src/g80_display.c | 2 | ||||
-rw-r--r-- | src/g80_sor.c | 4 | ||||
-rw-r--r-- | src/nv_driver.c | 4 | ||||
-rw-r--r-- | src/riva_driver.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/g80_dac.c b/src/g80_dac.c index fb56f47..0bc2521 100644 --- a/src/g80_dac.c +++ b/src/g80_dac.c @@ -194,7 +194,7 @@ static const xf86OutputFuncsRec G80DacOutputFuncs = { xf86OutputPtr G80CreateDac(ScrnInfoPtr pScrn, ORNum or) { - G80OutputPrivPtr pPriv = xnfcalloc(sizeof(*pPriv), 1); + G80OutputPrivPtr pPriv = XNFcallocarray(sizeof(*pPriv), 1); xf86OutputPtr output; char orName[5]; diff --git a/src/g80_display.c b/src/g80_display.c index 84e731c..b69c937 100644 --- a/src/g80_display.c +++ b/src/g80_display.c @@ -771,7 +771,7 @@ G80DispCreateCrtcs(ScrnInfoPtr pScrn) crtc = xf86CrtcCreate(pScrn, &g80_crtc_funcs); if(!crtc) return; - g80_crtc = xnfcalloc(sizeof(*g80_crtc), 1); + g80_crtc = XNFcallocarray(sizeof(*g80_crtc), 1); g80_crtc->head = head; g80_crtc->dither = pNv->Dither; crtc->driver_private = g80_crtc; diff --git a/src/g80_sor.c b/src/g80_sor.c index 0c3279f..48e5ade 100644 --- a/src/g80_sor.c +++ b/src/g80_sor.c @@ -442,7 +442,7 @@ static const xf86OutputFuncsRec G80SorLVDSOutputFuncs = { static DisplayModePtr ReadLVDSNativeMode(G80Ptr pNv, const int off) { - DisplayModePtr mode = xnfcalloc(1, sizeof(DisplayModeRec)); + DisplayModePtr mode = XNFcallocarray(1, sizeof(DisplayModeRec)); const CARD32 size = pNv->reg[(0x00610B4C+off)/4]; const int width = size & 0x3fff; const int height = (size >> 16) & 0x3fff; @@ -481,7 +481,7 @@ xf86OutputPtr G80CreateSor(ScrnInfoPtr pScrn, ORNum or, PanelType panelType) { G80Ptr pNv = G80PTR(pScrn); - G80OutputPrivPtr pPriv = xnfcalloc(sizeof(*pPriv), 1); + G80OutputPrivPtr pPriv = XNFcallocarray(sizeof(*pPriv), 1); const int off = 0x800 * or; xf86OutputPtr output; char orName[5]; diff --git a/src/nv_driver.c b/src/nv_driver.c index 01e556d..7ad931f 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -684,7 +684,7 @@ NVGetRec(ScrnInfoPtr pScrn) if (pScrn->driverPrivate != NULL) return TRUE; - pScrn->driverPrivate = xnfcalloc(sizeof(NVRec), 1); + pScrn->driverPrivate = XNFcallocarray(sizeof(NVRec), 1); /* Initialise it */ return TRUE; @@ -1915,7 +1915,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) * 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 = pNv->MinVClockFreqKHz; clockRanges->maxClock = pNv->MaxVClockFreqKHz; diff --git a/src/riva_driver.c b/src/riva_driver.c index 7026b11..0dce031 100644 --- a/src/riva_driver.c +++ b/src/riva_driver.c @@ -108,7 +108,7 @@ RivaGetRec(ScrnInfoPtr pScrn) if (pScrn->driverPrivate != NULL) return TRUE; - pScrn->driverPrivate = xnfcalloc(sizeof(RivaRec), 1); + pScrn->driverPrivate = XNFcallocarray(sizeof(RivaRec), 1); /* Initialise it */ RivaPTR(pScrn)->Dac = DacInit; @@ -695,7 +695,7 @@ RivaPreInit(ScrnInfoPtr pScrn, int flags) pRiva->MinClock = 12000; pRiva->MaxClock = pRiva->riva.MaxVClockFreqKHz; - clockRanges = xnfcalloc(sizeof(ClockRange), 1); + clockRanges = XNFcallocarray(sizeof(ClockRange), 1); clockRanges->next = NULL; clockRanges->minClock = pRiva->MinClock; clockRanges->maxClock = pRiva->MaxClock; |