From 0d6cd745232b97ee13d03ab1d9de589b0907e791 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 16:37:46 +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/smi_crtc.c | 4 ++-- src/smi_driver.c | 10 +++++----- src/smi_output.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/smi_crtc.c b/src/smi_crtc.c index e82f2d8..59c4552 100644 --- a/src/smi_crtc.c +++ b/src/smi_crtc.c @@ -241,8 +241,8 @@ SMI_CrtcConfigResize(ScrnInfoPtr pScrn, void SMI_CrtcFuncsInit_base(xf86CrtcFuncsPtr* crtcFuncs, SMICrtcPrivatePtr* crtcPriv){ - *crtcFuncs = xnfcalloc(sizeof(xf86CrtcFuncsRec), 1); - *crtcPriv = xnfcalloc(sizeof(SMICrtcPrivateRec), 1); + *crtcFuncs = XNFcallocarray(sizeof(xf86CrtcFuncsRec), 1); + *crtcPriv = XNFcallocarray(sizeof(SMICrtcPrivateRec), 1); (*crtcFuncs)->dpms = SMI_CrtcDPMS; (*crtcFuncs)->lock = SMI_CrtcLock; diff --git a/src/smi_driver.c b/src/smi_driver.c index f2e5841..9d5c110 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -266,7 +266,7 @@ SMI_GetRec(ScrnInfoPtr pScrn) * the allocation has already been done. */ if (pScrn->driverPrivate == NULL) { - pScrn->driverPrivate = xnfcalloc(sizeof(SMIRec), 1); + pScrn->driverPrivate = XNFcallocarray(sizeof(SMIRec), 1); } LEAVE(TRUE); @@ -404,13 +404,13 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) if (IS_MSOC(pSmi)) { pSmi->Save = SMI501_Save; - pSmi->save = xnfcalloc(sizeof(MSOCRegRec), 1); - pSmi->mode = xnfcalloc(sizeof(MSOCRegRec), 1); + pSmi->save = XNFcallocarray(sizeof(MSOCRegRec), 1); + pSmi->mode = XNFcallocarray(sizeof(MSOCRegRec), 1); } else { pSmi->Save = SMILynx_Save; - pSmi->save = xnfcalloc(sizeof(SMIRegRec), 1); - pSmi->mode = xnfcalloc(sizeof(SMIRegRec), 1); + pSmi->save = XNFcallocarray(sizeof(SMIRegRec), 1); + pSmi->mode = XNFcallocarray(sizeof(SMIRegRec), 1); } if (flags & PROBE_DETECT) { diff --git a/src/smi_output.c b/src/smi_output.c index 9098059..377ea4a 100644 --- a/src/smi_output.c +++ b/src/smi_output.c @@ -164,7 +164,7 @@ SMI_OutputDestroy(xf86OutputPtr output) void SMI_OutputFuncsInit_base(xf86OutputFuncsPtr* outputFuncs) { - *outputFuncs = xnfcalloc(sizeof(xf86OutputFuncsRec), 1); + *outputFuncs = XNFcallocarray(sizeof(xf86OutputFuncsRec), 1); (*outputFuncs)->create_resources = SMI_OutputCreateResources; (*outputFuncs)->mode_valid = SMI_OutputModeValid; -- cgit v1.2.3