From a1fd7e7ba5aadc770af8a71edfd152c99fe419d3 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 17:31:28 +0200 Subject: [PATCH] treewide: replace xnfrealloc() calls to XNFrealloc() This has been nothing but an alias for two decades now (somewhere in R6.6), so there doesn't seem to be any practical need for this indirection. The macro still needs to remain, as long as (external) drivers still using it. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- dix/dixutils.c | 2 +- hw/xfree86/common/xf86Helper.c | 2 +- hw/xfree86/modes/xf86Modes.c | 2 +- hw/xwayland/xwayland-dmabuf.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dix/dixutils.c b/dix/dixutils.c index ac5c0f962..9a950c6f2 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -800,7 +800,7 @@ CreateCallbackList(CallbackListPtr *pcbl) } } - listsToCleanup = (CallbackListPtr **) xnfrealloc(listsToCleanup, + listsToCleanup = (CallbackListPtr **) XNFrealloc(listsToCleanup, sizeof(CallbackListPtr *) * (numCallbackListsToCleanup + 1)); diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 25d23b85b..a6edccba7 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1339,7 +1339,7 @@ xf86MatchDevice(const char *drivername, GDevPtr ** sectlist) /* * we have a matching driver that wasn't claimed, yet */ - pgdp = xnfrealloc(pgdp, (i + 2) * sizeof(GDevPtr)); + pgdp = XNFrealloc(pgdp, (i + 2) * sizeof(GDevPtr)); pgdp[i++] = screensecptr->gpu_devices[k]; } } diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 3dde2b14c..0cf1eddac 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -288,7 +288,7 @@ xf86ModesEqual(const DisplayModeRec * pMode1, const DisplayModeRec * pMode2) static void add(char **p, const char *new) { - *p = xnfrealloc(*p, strlen(*p) + strlen(new) + 2); + *p = XNFrealloc(*p, strlen(*p) + strlen(new) + 2); strcat(*p, " "); strcat(*p, new); } diff --git a/hw/xwayland/xwayland-dmabuf.c b/hw/xwayland/xwayland-dmabuf.c index e7a5af23c..1676a82da 100644 --- a/hw/xwayland/xwayland-dmabuf.c +++ b/hw/xwayland/xwayland-dmabuf.c @@ -410,7 +410,7 @@ xwl_add_format_and_mod_to_list(struct xwl_format **formats, if (xwl_format == NULL) { (*num_formats)++; - *formats = xnfrealloc(*formats, *num_formats * sizeof(*xwl_format)); + *formats = XNFrealloc(*formats, *num_formats * sizeof(*xwl_format)); xwl_format = &(*formats)[*num_formats - 1]; xwl_format->format = format; xwl_format->num_modifiers = 0; @@ -424,7 +424,7 @@ xwl_add_format_and_mod_to_list(struct xwl_format **formats, } xwl_format->num_modifiers++; - xwl_format->modifiers = xnfrealloc(xwl_format->modifiers, + xwl_format->modifiers = XNFrealloc(xwl_format->modifiers, xwl_format->num_modifiers * sizeof(uint64_t)); xwl_format->modifiers[xwl_format->num_modifiers - 1] = modifier; } @@ -596,7 +596,7 @@ xwl_dmabuf_feedback_tranche_done(void *data, if (!appended) { xwl_feedback->dev_formats_len++; - xwl_feedback->dev_formats = xnfrealloc(xwl_feedback->dev_formats, + xwl_feedback->dev_formats = XNFrealloc(xwl_feedback->dev_formats, sizeof(struct xwl_device_formats) * xwl_feedback->dev_formats_len);