summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-05-08 16:37:46 +0200
committerEnrico Weigelt, metux IT consult <info@metux.net>2024-05-08 16:37:46 +0200
commit0d6cd745232b97ee13d03ab1d9de589b0907e791 (patch)
treea2652302b9a08cd19b6840248241881cee126940
parent6bb016cbec5d23de1ee531d149f987fb95a85674 (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-siliconmotion/-/merge_requests/5>
-rw-r--r--src/smi_crtc.c4
-rw-r--r--src/smi_driver.c10
-rw-r--r--src/smi_output.c2
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;