diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c index 2430505fb..ec8d025c4 100644 --- a/dri3/dri3_screen.c +++ b/dri3/dri3_screen.c @@ -255,7 +255,7 @@ dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable, } /* copy the screen mods so we can return an owned allocation */ - screen_mods = xnfalloc(screen_format->num_modifiers * sizeof(CARD64)); + screen_mods = XNFalloc(screen_format->num_modifiers * sizeof(CARD64)); memcpy(screen_mods, screen_format->modifiers, screen_format->num_modifiers * sizeof(CARD64)); diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 86455c407..c2f49131b 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -1095,7 +1095,7 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) if (xf86GlamorEGLPrivateIndex == -1) xf86GlamorEGLPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); - options = xnfalloc(sizeof(GlamorEGLOptions)); + options = XNFalloc(sizeof(GlamorEGLOptions)); memcpy(options, GlamorEGLOptions, sizeof(GlamorEGLOptions)); xf86ProcessOptions(scrn->scrnIndex, scrn->options, options); glvnd_vendor = xf86GetOptValString(options, GLAMOREGLOPT_VENDOR_LIBRARY); diff --git a/glamor/glamor_transfer.c b/glamor/glamor_transfer.c index 9404e899c..eefeb552b 100644 --- a/glamor/glamor_transfer.c +++ b/glamor/glamor_transfer.c @@ -42,7 +42,7 @@ glamor_upload_boxes(DrawablePtr drawable, BoxPtr in_boxes, int in_nbox, char *tmp_bits = NULL; if (glamor_drawable_effective_depth(drawable) == 24 && pixmap->drawable.depth == 32) - tmp_bits = xnfalloc(byte_stride * pixmap->drawable.height); + tmp_bits = XNFalloc(byte_stride * pixmap->drawable.height); glamor_make_current(glamor_priv); diff --git a/glamor/glamor_vbo.c b/glamor/glamor_vbo.c index 000c3e827..3b91bd8b5 100644 --- a/glamor/glamor_vbo.c +++ b/glamor/glamor_vbo.c @@ -128,7 +128,7 @@ glamor_get_vbo_space(ScreenPtr screen, unsigned size, char **vbo_offset) if (glamor_priv->vbo_size < size) { glamor_priv->vbo_size = MAX(GLAMOR_VBO_SIZE, size); free(glamor_priv->vb); - glamor_priv->vb = xnfalloc(glamor_priv->vbo_size); + glamor_priv->vb = XNFalloc(glamor_priv->vbo_size); } *vbo_offset = NULL; /* We point to the start of glamor_priv->vb every time, and diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 822515a86..2321be922 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -977,7 +977,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->base.fbconfigs = glxConvertConfigs(screen->core, screen->driConfigs); - options = xnfalloc(sizeof(GLXOptions)); + options = XNFalloc(sizeof(GLXOptions)); memcpy(options, GLXOptions, sizeof(GLXOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); glvnd = xf86GetOptValString(options, GLXOPT_VENDOR_LIBRARY); diff --git a/glx/glxscreens.c b/glx/glxscreens.c index 5cd9fcfd4..e766e2579 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -427,7 +427,7 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen) i = __glXGetExtensionString(pGlxScreen->glx_enable_bits, NULL); if (i > 0) { - pGlxScreen->GLXextensions = xnfalloc(i); + pGlxScreen->GLXextensions = XNFalloc(i); (void) __glXGetExtensionString(pGlxScreen->glx_enable_bits, pGlxScreen->GLXextensions); } diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index be894bd36..ace7bc5bd 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -1580,7 +1580,7 @@ __glXQueryServerString(CARD32 name) /* The spec doesn't mention this, but the Xorg server replies with * a string already terminated with '\0'. */ len = xcb_glx_query_server_string_string_length(reply); - buf = xnfalloc(len); + buf = XNFalloc(len); memcpy(buf, str, len); free(reply); diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 6eb3705c2..65773ef00 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -108,7 +108,7 @@ AppendToList(const char *s, const char ***list, int *lines) for (p = strtok(str, "\n"); p; p = strtok(NULL, "\n")) { (*lines)++; *list = xnfreallocarray(*list, *lines + 1, sizeof(**list)); - newstr = xnfalloc(strlen(p) + 2); + newstr = XNFalloc(strlen(p) + 2); strcpy(newstr, p); strcat(newstr, "\n"); (*list)[*lines - 1] = newstr; diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index ec84748ea..15310dc35 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -568,7 +568,7 @@ configFiles(XF86ConfFilesPtr fileconf) temp_path++; } - log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); + log_buf = XNFalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); temp_path = log_buf; start = (char *) defaultFontPath; while ((end = index(start, ',')) != NULL) { @@ -1643,7 +1643,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen, } else { /* Set up an empty input device list, then look for some core devices. */ - indp = xnfalloc(sizeof(InputInfoPtr)); + indp = XNFalloc(sizeof(InputInfoPtr)); *indp = NULL; servlayoutp->inputs = indp; } diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index afa1328a0..1da9aa613 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -124,7 +124,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, DevToConfig[i].iDriver = CurrentDriver; /* Fill in what we know, converting the driver name to lower case */ - lower_driver = xnfalloc(strlen(driver) + 1); + lower_driver = XNFalloc(strlen(driver) + 1); for (j = 0; (lower_driver[j] = tolower(driver[j])); j++); DevToConfig[i].GDev.driver = lower_driver; diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 43c775717..9794b9cb0 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -83,7 +83,7 @@ xf86AddDriver(DriverPtr driver, void *module, int flags) xf86NumDrivers++; xf86DriverList = xnfreallocarray(xf86DriverList, xf86NumDrivers, sizeof(DriverPtr)); - xf86DriverList[xf86NumDrivers - 1] = xnfalloc(sizeof(DriverRec)); + xf86DriverList[xf86NumDrivers - 1] = XNFalloc(sizeof(DriverRec)); *xf86DriverList[xf86NumDrivers - 1] = *driver; xf86DriverList[xf86NumDrivers - 1]->module = module; xf86DriverList[xf86NumDrivers - 1]->refCount = 0; @@ -118,7 +118,7 @@ xf86AddInputDriver(InputDriverPtr driver, void *module, int flags) xf86NumInputDrivers, sizeof(InputDriverPtr)); xf86InputDriverList[xf86NumInputDrivers - 1] = - xnfalloc(sizeof(InputDriverRec)); + XNFalloc(sizeof(InputDriverRec)); *xf86InputDriverList[xf86NumInputDrivers - 1] = *driver; xf86InputDriverList[xf86NumInputDrivers - 1]->module = module; } @@ -575,7 +575,7 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, scrp->confScreen->displays[i]->whiteColour.green = -1; scrp->confScreen->displays[i]->whiteColour.blue = -1; scrp->confScreen->displays[i]->defaultVisual = -1; - scrp->confScreen->displays[i]->modes = xnfalloc(sizeof(char *)); + scrp->confScreen->displays[i]->modes = XNFalloc(sizeof(char *)); scrp->confScreen->displays[i]->modes[0] = NULL; scrp->confScreen->displays[i]->depth = depth; scrp->confScreen->displays[i]->fbbpp = fbbpp; @@ -1550,7 +1550,7 @@ xf86SetBackingStore(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); OptionInfoPtr options; - options = xnfalloc(sizeof(BSOptions)); + options = XNFalloc(sizeof(BSOptions)); (void) memcpy(options, BSOptions, sizeof(BSOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); @@ -1596,7 +1596,7 @@ xf86SetSilkenMouse(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); OptionInfoPtr options; - options = xnfalloc(sizeof(SMOptions)); + options = XNFalloc(sizeof(SMOptions)); (void) memcpy(options, SMOptions, sizeof(SMOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index a28973ead..c20334dde 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -1457,7 +1457,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, * Store the clockRanges for later use by the VidMode extension. */ nt_list_for_each_entry(cp, clockRanges, next) { - ClockRangePtr newCR = xnfalloc(sizeof(ClockRange)); + ClockRangePtr newCR = XNFalloc(sizeof(ClockRange)); memcpy(newCR, cp, sizeof(ClockRange)); newCR->next = NULL; if (scrp->clockRanges == NULL) @@ -1574,7 +1574,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, } if (status == MODE_OK) { - new = xnfalloc(sizeof(DisplayModeRec)); + new = XNFalloc(sizeof(DisplayModeRec)); *new = *p; new->next = NULL; if (!q) { diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 92215b28f..482816f48 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -950,7 +950,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) if (fd != -1) { if (paused) { /* Put on new_input_devices list for delayed probe */ - PausedInputDevicePtr new_device = xnfalloc(sizeof *new_device); + PausedInputDevicePtr new_device = XNFalloc(sizeof *new_device); new_device->pInfo = pInfo; xorg_list_append(&new_device->node, &new_input_devices_list); diff --git a/hw/xfree86/ddc/ddc.c b/hw/xfree86/ddc/ddc.c index 621ef5336..effeff6fc 100644 --- a/hw/xfree86/ddc/ddc.c +++ b/hw/xfree86/ddc/ddc.c @@ -271,7 +271,7 @@ xf86DoEDID_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDC1SetSpeed, Bool noddc = FALSE, noddc1 = FALSE; OptionInfoPtr options; - options = xnfalloc(sizeof(DDCOptions)); + options = XNFalloc(sizeof(DDCOptions)); (void) memcpy(options, DDCOptions, sizeof(DDCOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 56ab5ee9d..488522ca9 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -2924,7 +2924,7 @@ drmmode_output_get_modes(xf86OutputPtr output) /* modes should already be available */ for (i = 0; i < koutput->count_modes; i++) { - Mode = xnfalloc(sizeof(DisplayModeRec)); + Mode = XNFalloc(sizeof(DisplayModeRec)); drmmode_ConvertFromKMode(output->scrn, &koutput->modes[i], Mode); Modes = xf86ModesAdd(Modes, Mode); diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index 0bbd93e34..8cb6a7aa4 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -121,7 +121,7 @@ exaDDXDriverInit(ScreenPtr pScreen) if (pScreenPriv == NULL) return; - pScreenPriv->options = xnfalloc(sizeof(EXAOptions)); + pScreenPriv->options = XNFalloc(sizeof(EXAOptions)); memcpy(pScreenPriv->options, EXAOptions, sizeof(EXAOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pScreenPriv->options); diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index 885f5e96e..602e39932 100644 --- a/hw/xfree86/fbdevhw/fbdevhw.c +++ b/hw/xfree86/fbdevhw/fbdevhw.c @@ -287,7 +287,7 @@ fbdev_open_pci(struct pci_device *pPci, char **namep) if (fd != -1) { if (ioctl(fd, FBIOGET_FSCREENINFO, (void *) &fix) != -1) { if (namep) { - *namep = xnfalloc(16); + *namep = XNFalloc(16); strncpy(*namep, fix.id, 16); } @@ -396,7 +396,7 @@ fbdev_open(int scrnIndex, const char *dev, char **namep) return -1; } else { - *namep = xnfalloc(16); + *namep = XNFalloc(16); strncpy(*namep, fix.id, 16); } } diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c index 9e52305d9..ec4e4c175 100644 --- a/hw/xfree86/int10/generic.c +++ b/hw/xfree86/int10/generic.c @@ -141,7 +141,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) pInt->private = (void *) xnfcalloc(1, sizeof(genericInt10Priv)); INTPriv(pInt)->alloc = (void *) xnfcalloc(1, ALLOC_ENTRIES(getpagesize())); pInt->pScrn = pScrn; - base = INTPriv(pInt)->base = xnfalloc(SYS_BIOS); + base = INTPriv(pInt)->base = XNFalloc(SYS_BIOS); /* FIXME: Shouldn't this be a failure case? Leaving dev as NULL seems like * FIXME: an error @@ -217,7 +217,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) } #else if (!sysMem) { - sysMem = xnfalloc(BIOS_SIZE); + sysMem = XNFalloc(BIOS_SIZE); setup_system_bios(sysMem); } INTPriv(pInt)->sysMem = sysMem; diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c index c7c8478e6..ccfecf15d 100644 --- a/hw/xfree86/int10/helper_exec.c +++ b/hw/xfree86/int10/helper_exec.c @@ -744,7 +744,7 @@ xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save) base += BIOS_SCRATCH_OFF; if (save) { - if ((pInt->BIOSScratch = xnfalloc(BIOS_SCRATCH_LEN))) + if ((pInt->BIOSScratch = XNFalloc(BIOS_SCRATCH_LEN))) for (i = 0; i < BIOS_SCRATCH_LEN; i++) *(((char *) pInt->BIOSScratch + i)) = *(base + i); } diff --git a/hw/xfree86/int10/vbe.c b/hw/xfree86/int10/vbe.c index 3c0f0761b..48878cd40 100644 --- a/hw/xfree86/int10/vbe.c +++ b/hw/xfree86/int10/vbe.c @@ -143,7 +143,7 @@ VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags) L_ADD(vbe-> OemProductRevPtr))); } - vip = (vbeInfoPtr) xnfalloc(sizeof(vbeInfoRec)); + vip = (vbeInfoPtr) XNFalloc(sizeof(vbeInfoRec)); vip->version = B_O16(vbe->VbeVersion); vip->pInt10 = pInt; vip->ddc = DDC_UNCHECKED; @@ -270,7 +270,7 @@ vbeReadEDID(vbeInfoPtr pVbe) if (!page) return NULL; - options = xnfalloc(sizeof(VBEOptions)); + options = XNFalloc(sizeof(VBEOptions)); (void) memcpy(options, VBEOptions, sizeof(VBEOptions)); xf86ProcessOptions(screen, pScrn->options, options); xf86GetOptValBool(options, VBEOPT_NOVBE, &novbe); @@ -302,7 +302,7 @@ vbeReadEDID(vbeInfoPtr pVbe) switch (pVbe->pInt10->ax & 0xff00) { case 0x0: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC read successfully\n"); - tmp = (unsigned char *) xnfalloc(128); + tmp = (unsigned char *) XNFalloc(128); memcpy(tmp, page, 128); break; case 0x100: @@ -1078,7 +1078,7 @@ VBEReadPanelID(vbeInfoPtr pVbe) case 0x0: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE PanelID read successfully\n"); - tmp = xnfalloc(32); + tmp = XNFalloc(32); memcpy(tmp, page, 32); break; case 0x100: diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index cf84112b1..647e2a5f5 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -521,7 +521,7 @@ xf86OutputSetMonitor(xf86OutputPtr output) free(output->options); - output->options = xnfalloc(sizeof(xf86OutputOptions)); + output->options = XNFalloc(sizeof(xf86OutputOptions)); memcpy(output->options, xf86OutputOptions, sizeof(xf86OutputOptions)); XNFasprintf(&option_name, "monitor-%s", output->name); @@ -2551,7 +2551,7 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow) Bool success = FALSE; /* Set up the device options */ - config->options = xnfalloc(sizeof(xf86DeviceOptions)); + config->options = XNFalloc(sizeof(xf86DeviceOptions)); memcpy(config->options, xf86DeviceOptions, sizeof(xf86DeviceOptions)); xf86ProcessOptions(scrn->scrnIndex, scrn->options, config->options); config->debug_modes = xf86ReturnOptValBool(config->options, diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 00586c457..3dde2b14c 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -212,7 +212,7 @@ xf86DuplicateMode(const DisplayModeRec * pMode) { DisplayModePtr pNew; - pNew = xnfalloc(sizeof(DisplayModeRec)); + pNew = XNFalloc(sizeof(DisplayModeRec)); *pNew = *pMode; pNew->next = NULL; pNew->prev = NULL; diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index d7e0a125a..c078e6a5c 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -1346,7 +1346,7 @@ keyboard_check_repeat (DeviceIntPtr dev, XkbSrvInfoPtr xkbi, unsigned key) } } - p = xnfalloc(sizeof(struct sync_pending)); + p = XNFalloc(sizeof(struct sync_pending)); p->pending_dev = dev; callback = wl_display_sync (xwl_screen->display); xorg_list_add(&p->l, &xwl_seat->sync_pending); diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 7c8ebd49a..42569f73d 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -1187,7 +1187,7 @@ xwl_output_set_transform(struct xwl_output *xwl_output) } if (xwl_output->transform == NULL) { - xwl_output->transform = xnfalloc(sizeof(RRTransformRec)); + xwl_output->transform = XNFalloc(sizeof(RRTransformRec)); RRTransformInit(xwl_output->transform); } diff --git a/mi/mioverlay.c b/mi/mioverlay.c index b8b7a5ba8..57d07cdf3 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -1860,7 +1860,7 @@ MarkUnderlayWindow(WindowPtr pWin) if (pTree->valdata) return; pTree->valdata = - (miOverlayValDataPtr) xnfalloc(sizeof(miOverlayValDataRec)); + (miOverlayValDataPtr) XNFalloc(sizeof(miOverlayValDataRec)); pTree->valdata->oldAbsCorner.x = pWin->drawable.x; pTree->valdata->oldAbsCorner.y = pWin->drawable.y; pTree->valdata->borderVisible = NullRegion; diff --git a/mi/miwindow.c b/mi/miwindow.c index 39c279e18..dfdb0701e 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -124,7 +124,7 @@ miMarkWindow(WindowPtr pWin) if (pWin->valdata) return; - val = (ValidatePtr) xnfalloc(sizeof(ValidateRec)); + val = (ValidatePtr) XNFalloc(sizeof(ValidateRec)); val->before.oldAbsCorner.x = pWin->drawable.x; val->before.oldAbsCorner.y = pWin->drawable.y; val->before.borderVisible = NullRegion; diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c index 7bc93bfac..35841dd2b 100644 --- a/xkb/xkbtext.c +++ b/xkb/xkbtext.c @@ -64,7 +64,7 @@ tbGetBuffer(unsigned size) if (size > tb->size) { free(tb->buffer); - tb->buffer = xnfalloc(size); + tb->buffer = XNFalloc(size); tb->size = size; } return tb->buffer;