diff options
Diffstat (limited to 'hw/xfree86/common')
24 files changed, 228 insertions, 228 deletions
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 7b836b00d..896f6950c 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -111,7 +111,7 @@ AppendToList(const char *s, const char ***list, int *lines) (*list)[*lines - 1] = newstr; (*list)[*lines] = NULL; } - xfree(str); + free(str); } static void @@ -121,9 +121,9 @@ FreeList(const char ***list, int *lines) for (i = 0; i < *lines; i++) { if ((*list)[i]) - xfree((*list)[i]); + free((*list)[i]); } - xfree(*list); + free(*list); *list = NULL; *lines = 0; } @@ -262,7 +262,7 @@ xf86AutoConfig(void) AppendToConfig(BUILTIN_LAYOUT_SECTION_POST); for (p = deviceList; *p; p++) { - xfree(*p); + free(*p); } xf86MsgVerb(X_DEFAULT, 0, @@ -374,7 +374,7 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip while (matches[i]) { i++; } - matches[i] = (char*)xalloc(sizeof(char) * strlen(direntry->d_name) - 3); + matches[i] = (char*)malloc(sizeof(char) * strlen(direntry->d_name) - 3); if (!matches[i]) { xf86Msg(X_ERROR, "Could not allocate space for the module name. Exiting.\n"); goto end; @@ -401,7 +401,7 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip direntry = readdir(idsdir); } end: - xfree(line); + free(line); closedir(idsdir); } #endif /* __linux__ */ @@ -534,7 +534,7 @@ copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver) return FALSE; memcpy(xf86ConfigLayout.screens[i].screen, oscreen, sizeof(confScreenRec)); - cptr = xcalloc(1, sizeof(GDevRec)); + cptr = calloc(1, sizeof(GDevRec)); if (!cptr) return FALSE; memcpy(cptr, odev, sizeof(GDevRec)); @@ -565,7 +565,7 @@ autoConfigDevice(GDevPtr preconf_device) if (preconf_device) { ptr = preconf_device; } else { - ptr = xcalloc(1, sizeof(GDevRec)); + ptr = calloc(1, sizeof(GDevRec)); if (!ptr) { return NULL; } @@ -620,13 +620,13 @@ autoConfigDevice(GDevPtr preconf_device) xf86ConfigLayout.screens[i+num_matches] = slp[i]; } xf86ConfigLayout.screens[num_screens+num_matches-1].screen = NULL; - xfree(slp); + free(slp); } else { /* layout does not have any screens, not much to do */ ptr->driver = matches[0]; for (i = 1; matches[i] ; i++) { if (matches[i] != matches[0]) { - xfree(matches[i]); + free(matches[i]); } } } diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 9d243c172..39e531a59 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -98,7 +98,7 @@ StringToBusType(const char* busID, const char **retID) s = xstrdup(busID); p = strtok(s, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return BUS_NONE; } if (!xf86NameCmp(p, "pci") || !xf86NameCmp(p, "agp")) @@ -108,7 +108,7 @@ StringToBusType(const char* busID, const char **retID) if (ret != BUS_NONE) if (retID) *retID = busID + strlen(p) + 1; - xfree(s); + free(s); return ret; } @@ -295,8 +295,8 @@ xf86ClearEntityListForScreen(int scrnIndex) xf86Entities[entityIndex]->inUse = FALSE; /* disable resource: call the disable function */ } - xfree(pScrn->entityList); - xfree(pScrn->entityInstanceList); + free(pScrn->entityList); + free(pScrn->entityInstanceList); pScrn->entityList = NULL; pScrn->entityInstanceList = NULL; } diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 9a2837e7b..a4813683c 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -184,7 +184,7 @@ xf86ValidateFontPath(char *path) int flag; int dirlen; - tmp_path = xcalloc(1,strlen(path)+1); + tmp_path = calloc(1,strlen(path)+1); out_pnt = tmp_path; path_elem = NULL; next = path; @@ -205,7 +205,7 @@ xf86ValidateFontPath(char *path) if (flag != 0) { xf86Msg(X_WARNING, "The directory \"%s\" does not exist.\n", dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); - xfree(dir_elem); + free(dir_elem); continue; } else { @@ -216,18 +216,18 @@ xf86ValidateFontPath(char *path) if (flag == 0) if (!S_ISREG(stat_buf.st_mode)) flag = -1; - xfree(p1); + free(p1); if (flag != 0) { xf86Msg(X_WARNING, "`fonts.dir' not found (or not valid) in \"%s\".\n", dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem); - xfree(dir_elem); + free(dir_elem); continue; } } - xfree(dir_elem); + free(dir_elem); } /* @@ -363,7 +363,7 @@ xf86ModulelistFromConfig(pointer **optlist) if (optlist) *optlist = optarray; else - xfree(optarray); + free(optarray); return modulearray; } @@ -622,7 +622,7 @@ configFiles(XF86ConfFilesPtr fileconf) /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath; defaultFontPath = xf86ValidateFontPath(temp_path); - xfree(temp_path); + free(temp_path); /* make fontpath more readable in the logfiles */ countDirs = 1; @@ -647,7 +647,7 @@ configFiles(XF86ConfFilesPtr fileconf) *(temp_path++) = '\t'; strcpy(temp_path, start); xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf); - xfree(log_buf); + free(log_buf); /* ModulePath */ @@ -1199,7 +1199,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) for (devs = servlayoutp->inputs; devs && *devs; devs++) if (*devs == corePointer) { - xfree(*devs); + free(*devs); *devs = (IDevPtr)0x1; /* ensure we dont skip next loop*/ break; } @@ -1341,7 +1341,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) for (devs = servlayoutp->inputs; devs && *devs; devs++) if (*devs == coreKeyboard) { - xfree(*devs); + free(*devs); *devs = (IDevPtr)0x1; /* ensure we dont skip next loop */ break; } @@ -1503,8 +1503,8 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp) indp[count] = xnfalloc(sizeof(IDevRec)); if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) { while(count--) - xfree(indp[count]); - xfree(indp); + free(indp[count]); + free(indp); return FALSE; } indp[count]->extraOptions = irp->iref_option_lst; @@ -1595,7 +1595,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, scrnum = adjp->adj_scrnum; if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum, X_CONFIG)) { - xfree(slp); + free(slp); return FALSE; } slp[count].x = adjp->adj_x; @@ -1640,8 +1640,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst, 0, X_CONFIG)) { - xfree(slp[0].screen); - xfree(slp); + free(slp[0].screen); + free(slp); return FALSE; } } @@ -1700,7 +1700,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, count = 0; while (idp) { if (!configDevice(&gdp[count], idp->inactive_device, FALSE)) { - xfree(gdp); + free(gdp); return FALSE; } count++; @@ -1760,7 +1760,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen, slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); slp[1].screen = NULL; if (!configScreen(slp[0].screen, conf_screen, 0, from)) { - xfree(slp); + free(slp); return FALSE; } servlayoutp->id = "(implicit)"; @@ -2306,7 +2306,7 @@ configExtensions(XF86ConfExtensionsPtr conf_ext) enable = !enable; } else { xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val); - xfree(n); + free(n); continue; } @@ -2317,7 +2317,7 @@ configExtensions(XF86ConfExtensionsPtr conf_ext) xf86Msg(X_WARNING, "Ignoring unrecognized extension \"%s\"\n", name); } - xfree(n); + free(n); } } } @@ -2365,7 +2365,7 @@ addDefaultModes(MonPtr monitorp) monitorp->Modes = xf86ModesAdd(monitorp->Modes, mode); last = mode; } else { - xfree(mode); + free(mode); } } monitorp->Last = last; @@ -2402,7 +2402,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) { xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->identifier); current = dev; - xfree(*dev); + free(*dev); do { *current = *(current + 1); diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 67bf08bbf..ef61e4698 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -163,7 +163,7 @@ bus_sbus_newdev_configure(void *busData, int i) if (promPath) { DevToConfig[i].GDev.busID = xnfalloc(strlen(promPath) + 6); sprintf(DevToConfig[i].GDev.busID, "SBUS:%s", promPath); - xfree(promPath); + free(promPath); } else { DevToConfig[i].GDev.busID = xnfalloc(12); sprintf(DevToConfig[i].GDev.busID, "SBUS:fb%d", @@ -399,7 +399,7 @@ configureDeviceSection (int screennum) int len = strlen(ptr->dev_comment) + strlen(prefix) + strlen(middle) + strlen(suffix) + 1; - optname = xalloc(strlen(p->name) + 2 + 1); + optname = malloc(strlen(p->name) + 2 + 1); if (!optname) break; sprintf(optname, "\"%s\"", p->name); @@ -407,13 +407,13 @@ configureDeviceSection (int screennum) len += max(20, strlen(optname)); len += strlen(opttype); - ptr->dev_comment = xrealloc(ptr->dev_comment, len); + ptr->dev_comment = realloc(ptr->dev_comment, len); if (!ptr->dev_comment) break; p_e = ptr->dev_comment + strlen(ptr->dev_comment); sprintf(p_e, "%s%-20s%s%s%s", prefix, optname, middle, opttype, suffix); - xfree(optname); + free(optname); } } } @@ -512,7 +512,7 @@ configureModuleSection (void) ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem( (glp)ptr->mod_load_lst, (glp)module); } - xfree(elist); + free(elist); } return ptr; @@ -658,7 +658,7 @@ DoConfigure(void) /* Load all the drivers that were found. */ xf86LoadModules(vlist, NULL); - xfree(vlist); + free(vlist); for (i = 0; i < xf86NumDrivers; i++) { xorgHWFlags flags; @@ -807,7 +807,7 @@ DoConfigure(void) } } } - xfree(driverProbed); + free(driverProbed); } diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 6740faf65..9cde0599d 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -502,7 +502,7 @@ AddEdge( } if(!pEdge) { - if(!(pNew = xalloc(sizeof(xf86EdgeRec)))) + if(!(pNew = malloc(sizeof(xf86EdgeRec)))) break; pNew->screen = screen; @@ -519,7 +519,7 @@ AddEdge( break; } else if (min < pEdge->start) { - if(!(pNew = xalloc(sizeof(xf86EdgeRec)))) + if(!(pNew = malloc(sizeof(xf86EdgeRec)))) break; pNew->screen = screen; @@ -850,10 +850,10 @@ xf86ReconfigureLayout(void) for (i = 0; i < MAXSCREENS; i++) { xf86ScreenLayoutPtr sl = &xf86ScreenLayout[i]; /* we don't have to zero these, xf86InitOrigins() takes care of that */ - if (sl->left) xfree(sl->left); - if (sl->right) xfree(sl->right); - if (sl->up) xfree(sl->up); - if (sl->down) xfree(sl->down); + if (sl->left) free(sl->left); + if (sl->right) free(sl->right); + if (sl->up) free(sl->up); + if (sl->down) free(sl->down); } xf86InitOrigins(); diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 794a13171..a51a754e4 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -124,7 +124,7 @@ DGAInit( if (!pScreenPriv) { - if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) + if(!(pScreenPriv = (DGAScreenPtr)malloc(sizeof(DGAScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; @@ -235,8 +235,8 @@ FreeMarkedVisuals(ScreenPtr pScreen) prev->next = curr; else pScreenPriv->fakedVisuals = curr; - xfree(tmp->pVisual); - xfree(tmp); + free(tmp->pVisual); + free(tmp); } else { prev = curr; curr = curr->next; @@ -263,7 +263,7 @@ DGACloseScreen(int i, ScreenPtr pScreen) /* DGAShutdown() should have ensured that no DGA screen were active by here */ - xfree(pScreenPriv); + free(pScreenPriv); return((*pScreen->CloseScreen)(i, pScreen)); } @@ -363,7 +363,7 @@ xf86SetDGAMode( else (*pScreen->DestroyPixmap)(oldPix); } - xfree(pScreenPriv->current); + free(pScreenPriv->current); pScreenPriv->current = NULL; pScrn->vtSema = TRUE; (*pScreenPriv->funcs->SetMode)(pScrn, NULL); @@ -391,7 +391,7 @@ xf86SetDGAMode( else return BadValue; - if(!(device = (DGADevicePtr)xalloc(sizeof(DGADeviceRec)))) + if(!(device = (DGADevicePtr)malloc(sizeof(DGADeviceRec)))) return BadAlloc; if(!pScreenPriv->current) { @@ -403,7 +403,7 @@ xf86SetDGAMode( } if(!(*pScreenPriv->funcs->SetMode)(pScrn, pMode)) { - xfree(device); + free(device); return BadAlloc; } @@ -424,7 +424,7 @@ xf86SetDGAMode( else (*pScreen->DestroyPixmap)(oldPix); } - xfree(pScreenPriv->current); + free(pScreenPriv->current); pScreenPriv->current = NULL; } @@ -671,7 +671,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) pMode = &(pScreenPriv->modes[mode - 1]); - if(!(pVisual = xalloc(sizeof(VisualRec)))) + if(!(pVisual = malloc(sizeof(VisualRec)))) return BadAlloc; pVisual->vid = FakeClientID(0); @@ -705,8 +705,8 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) pVisual->offsetBlue = BitsClear(pVisual->blueMask); } - if(!(fvlp = xalloc(sizeof(FakedVisualList)))) { - xfree(pVisual); + if(!(fvlp = malloc(sizeof(FakedVisualList)))) { + free(pVisual); return BadAlloc; } diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index 22174c74e..cd33e75e7 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -65,7 +65,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) DPMSKey = &DPMSKeyIndex; if (!dixSetPrivate(&pScreen->devPrivates, DPMSKey, - xcalloc(sizeof(DPMSRec), 1))) + calloc(sizeof(DPMSRec), 1))) return FALSE; pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); @@ -127,7 +127,7 @@ DPMSClose(int i, ScreenPtr pScreen) xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0); } - xfree(pDPMS); + free(pDPMS); dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL); if (--DPMSCount == 0) DPMSKey = NULL; diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index ebf03bfe7..2ff77c61d 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -567,7 +567,7 @@ addInputHandler(int fd, InputHandlerProc proc, pointer data) if (fd < 0 || !proc) return NULL; - ih = xcalloc(sizeof(*ih), 1); + ih = calloc(sizeof(*ih), 1); if (!ih) return NULL; @@ -616,7 +616,7 @@ removeInputHandler(IHPtr ih) if (ih) p->next = ih->next; } - xfree(ih); + free(ih); } int diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 1cc1526c9..9ec594144 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -105,7 +105,7 @@ xf86DeleteDriver(int drvIndex) && (!xf86DriverHasEntities(xf86DriverList[drvIndex]))) { if (xf86DriverList[drvIndex]->module) UnloadModule(xf86DriverList[drvIndex]->module); - xfree(xf86DriverList[drvIndex]); + free(xf86DriverList[drvIndex]); xf86DriverList[drvIndex] = NULL; } } @@ -137,7 +137,7 @@ xf86DeleteInputDriver(int drvIndex) { if (xf86InputDriverList[drvIndex] && xf86InputDriverList[drvIndex]->module) UnloadModule(xf86InputDriverList[drvIndex]->module); - xfree(xf86InputDriverList[drvIndex]); + free(xf86InputDriverList[drvIndex]); xf86InputDriverList[drvIndex] = NULL; } @@ -239,11 +239,11 @@ xf86DeleteScreen(int scrnIndex, int flags) pScrn->drv->refCount--; if (pScrn->privates) - xfree(pScrn->privates); + free(pScrn->privates); xf86ClearEntityListForScreen(scrnIndex); - xfree(pScrn); + free(pScrn); /* Move the other entries down, updating their scrnIndex fields */ @@ -285,7 +285,7 @@ xf86AllocateInput(InputDriverPtr drv, int flags) { InputInfoPtr new, *prev = NULL; - if (!(new = xcalloc(sizeof(InputInfoRec), 1))) + if (!(new = calloc(sizeof(InputInfoRec), 1))) return NULL; new->drv = drv; @@ -332,7 +332,7 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) * if the driver forgets about it make sure we free it or at least crash * with flying colors */ if (pInp->private) - xfree(pInp->private); + free(pInp->private); /* Remove the entry from the list. */ if (pInp == xf86InputDevs) @@ -345,7 +345,7 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) p->next = pInp->next; /* Else the entry wasn't in the xf86InputDevs list (ignore this). */ } - xfree(pInp); + free(pInp); } Bool @@ -1224,7 +1224,7 @@ xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, /* Prefix the scrnIndex name to the format string. */ if (scrnIndex >= 0 && scrnIndex < xf86NumScreens && xf86Screens[scrnIndex]->name) { - tmpFormat = xalloc(strlen(format) + + tmpFormat = malloc(strlen(format) + strlen(xf86Screens[scrnIndex]->name) + PREFIX_SIZE + 1); if (!tmpFormat) @@ -1235,7 +1235,7 @@ xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, strcat(tmpFormat, format); LogVMessageVerb(type, verb, tmpFormat, args); - xfree(tmpFormat); + free(tmpFormat); } else LogVMessageVerb(type, verb, format, args); } @@ -1502,7 +1502,7 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) if (sectlist) *sectlist = pgdp; else - xfree(pgdp); + free(pgdp); return i; } @@ -1697,7 +1697,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, * allow the config file to override this. */ if (allocatedInstances <= 0) { - xfree(instances); + free(instances); return 0; } @@ -1912,7 +1912,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, } } } - xfree(instances); + free(instances); if (numFound > 0) { *foundEntities = retEntities; } @@ -2206,14 +2206,14 @@ xf86LoadOneModule(char *name, pointer opt) if (Name == NULL) return NULL; if (*Name == '\0') { - xfree(Name); + free(Name); return NULL; } mod = LoadModule(Name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin); if (!mod) LoaderErrorMsg(NULL, Name, errmaj, errmin); - xfree(Name); + free(Name); return mod; } @@ -2267,7 +2267,7 @@ xf86SetBackingStore(ScreenPtr pScreen) if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS)) from = X_CONFIG; } - xfree(options); + free(options); pScreen->backingStoreSupport = useBS ? Always : NotUseful; if (serverGeneration == 1) xf86DrvMsg(pScreen->myNum, from, "Backing store %s\n", @@ -2306,7 +2306,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen) if (xf86GetOptValBool(options, OPTION_SILKEN_MOUSE, &useSM)) from = X_CONFIG; } - xfree(options); + free(options); /* * XXX quick hack to report correctly for OSs that can't do SilkenMouse * yet. Should handle this differently so that alternate async methods @@ -2392,13 +2392,13 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, if (!(pEnt->location.type == BUS_PCI) || !xf86GetPciInfoForEntity(entityIndex)) { - xfree(pEnt); + free(pEnt); return pScrn; } if (!pEnt->active) { xf86ConfigPciEntityInactive(pEnt, p_chip, init, enter, leave, private); - xfree(pEnt); + free(pEnt); return pScrn; } @@ -2411,7 +2411,7 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, if (xf86IsEntityShared(entityIndex)) { return pScrn; } - xfree(pEnt); + free(pEnt); xf86SetEntityFuncs(entityIndex,init,enter,leave,private); @@ -2427,13 +2427,13 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, if (!pEnt) return pScrn; if (!(pEnt->location.type == BUS_NONE)) { - xfree(pEnt); + free(pEnt); return pScrn; } if (!pEnt->active) { xf86ConfigFbEntityInactive(pEnt, init, enter, leave, private); - xfree(pEnt); + free(pEnt); return pScrn; } @@ -2461,12 +2461,12 @@ xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, if (!pEnt) return FALSE; if (!pEnt->active || !(pEnt->location.type == BUS_PCI)) { - xfree(pEnt); + free(pEnt); return FALSE; } xf86AddEntityToScreen(pScrn,entityIndex); - xfree(pEnt); + free(pEnt); if (!xf86SetEntityFuncs(entityIndex,init,enter,leave,private)) return FALSE; @@ -2511,7 +2511,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, } if (!pNewProp) { - if ((pNewProp = (RootWinPropPtr)xalloc(sizeof(RootWinProp))) == NULL) { + if ((pNewProp = (RootWinPropPtr)malloc(sizeof(RootWinProp))) == NULL) { return(BadAlloc); } /* @@ -2521,7 +2521,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, pNewProp->next = NULL; } else { if (pNewProp->name) - xfree(pNewProp->name); + free(pNewProp->name); existing = TRUE; } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 55d7a6209..39d229b9a 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -438,7 +438,7 @@ probe_devices_from_device_sections(DriverPtr drvp) } } } - xfree(devList); + free(devList); return foundScreen; } @@ -617,8 +617,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* Load all modules specified explicitly in the config file */ if ((modulelist = xf86ModulelistFromConfig(&optionlist))) { xf86LoadModules(modulelist, optionlist); - xfree(modulelist); - xfree(optionlist); + free(modulelist); + free(optionlist); } /* Load all driver modules specified in the config file */ @@ -634,13 +634,13 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } if ((modulelist = xf86DriverlistFromConfig())) { xf86LoadModules(modulelist, NULL); - xfree(modulelist); + free(modulelist); } /* Load all input driver modules specified in the config file. */ if ((modulelist = xf86InputDriverlistFromConfig())) { xf86LoadModules(modulelist, NULL); - xfree(modulelist); + free(modulelist); } /* @@ -940,7 +940,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* This memory needs to stay available until the screen has been initialized, and we can create the property for real. */ - if ( (VT = xalloc(sizeof(CARD32)))==NULL ) { + if ( (VT = malloc(sizeof(CARD32)))==NULL ) { FatalError("Unable to make VT property - out of memory. Exiting...\n"); } *VT = xf86Info.vtno; @@ -1756,7 +1756,7 @@ xf86LoadModules(char **list, pointer *optlist) LoaderErrorMsg(NULL, name, errmaj, errmin); failed = TRUE; } - xfree(name); + free(name); } return !failed; } diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 5d30a782c..7bdf79a68 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -1918,8 +1918,8 @@ xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) mode->next->prev = mode->prev; } - xfree(mode->name); - xfree(mode); + free(mode->name); + free(mode); } /* diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c index a2868bf21..699204ce5 100644 --- a/hw/xfree86/common/xf86Option.c +++ b/hw/xfree86/common/xf86Option.c @@ -601,8 +601,8 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, if (strncmp(n, "no", 2) == 0) { newn = n + 2; } else { - xfree(n); - n = xalloc(strlen(p->name) + 2 + 1); + free(n); + n = malloc(strlen(p->name) + 2 + 1); if (!n) { p->found = FALSE; return FALSE; @@ -632,7 +632,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, } xf86ErrorFVerb(2, "\n"); } - xfree(n); + free(n); } else { p->found = FALSE; } @@ -843,7 +843,7 @@ xf86NormalizeName(const char *s) if (s == NULL) return NULL; - ret = xalloc(strlen(s) + 1); + ret = malloc(strlen(s) + 1); for (p = s, q = ret; *p != 0; p++) { switch (*p) { case '_': diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c index 86c7bde79..455a02cc2 100644 --- a/hw/xfree86/common/xf86RandR.c +++ b/hw/xfree86/common/xf86RandR.c @@ -359,7 +359,7 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen) scrp->virtualY = pScreen->height = randrp->virtualY; scrp->currentMode = scrp->modes; pScreen->CloseScreen = randrp->CloseScreen; - xfree (randrp); + free(randrp); dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL); return (*pScreen->CloseScreen) (index, pScreen); } @@ -426,13 +426,13 @@ xf86RandRInit (ScreenPtr pScreen) xf86RandRKey = &xf86RandRKeyIndex; - randrp = xalloc (sizeof (XF86RandRInfoRec)); + randrp = malloc(sizeof (XF86RandRInfoRec)); if (!randrp) return FALSE; if (!RRScreenInit (pScreen)) { - xfree (randrp); + free(randrp); return FALSE; } rp = rrGetScrPriv(pScreen); diff --git a/hw/xfree86/common/xf86ShowOpts.c b/hw/xfree86/common/xf86ShowOpts.c index 04a9a8b1c..ff4b651c1 100644 --- a/hw/xfree86/common/xf86ShowOpts.c +++ b/hw/xfree86/common/xf86ShowOpts.c @@ -85,7 +85,7 @@ void DoShowOptions (void) { goto bail; } xf86LoadModules (vlist,0); - xfree (vlist); + free(vlist); for (i = 0; i < xf86NumDrivers; i++) { if (xf86DriverList[i]->AvailableOptions) { OptionInfoPtr pOption = (OptionInfoPtr)(*xf86DriverList[i]->AvailableOptions)(0,0); @@ -95,7 +95,7 @@ void DoShowOptions (void) { ); continue; } - pSymbol = xalloc ( + pSymbol = malloc( strlen(xf86DriverList[i]->driverName) + strlen("ModuleData") + 1 ); strcpy (pSymbol, xf86DriverList[i]->driverName); @@ -109,7 +109,7 @@ void DoShowOptions (void) { ); for (p = pOption; p->name != NULL; p++) { const char *opttype = optionTypeToSting(p->type); - char *optname = xalloc(strlen(p->name) + 2 + 1); + char *optname = malloc(strlen(p->name) + 2 + 1); if (!optname) { continue; } diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c index 52a8b9a60..4a736fc7a 100644 --- a/hw/xfree86/common/xf86VGAarbiter.c +++ b/hw/xfree86/common/xf86VGAarbiter.c @@ -178,7 +178,7 @@ xf86VGAarbiterWrapFunctions(void) if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) return FALSE; - if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) + if (!(pScreenPriv = malloc(sizeof(VGAarbiterScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); @@ -250,7 +250,7 @@ VGAarbiterCloseScreen (int i, ScreenPtr pScreen) UNWRAP_SCREEN_INFO(FreeScreen); UNWRAP_SPRITE; - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); xf86VGAarbiterLock(xf86Screens[i]); val = (*pScreen->CloseScreen) (i, pScreen); xf86VGAarbiterUnlock(xf86Screens[i]); diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index 49b86e73a..e704f5a46 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -70,7 +70,7 @@ VidModeExtensionInit(ScreenPtr pScreen) VidModeKey = &VidModeKeyIndex; if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey, - xcalloc(sizeof(VidModeRec), 1))) { + calloc(sizeof(VidModeRec), 1))) { DebugF("xcalloc failed\n"); return FALSE; } @@ -103,7 +103,7 @@ VidModeClose(int i, ScreenPtr pScreen) pScreen->CloseScreen = pVidMode->CloseScreen; if (--VidModeCount == 0) { - xfree(dixLookupPrivate(&pScreen->devPrivates, VidModeKey)); + free(dixLookupPrivate(&pScreen->devPrivates, VidModeKey)); dixSetPrivate(&pScreen->devPrivates, VidModeKey, NULL); VidModeKey = NULL; } @@ -527,7 +527,7 @@ VidModeCreateMode(void) { DisplayModePtr mode; - mode = xalloc(sizeof(DisplayModeRec)); + mode = malloc(sizeof(DisplayModeRec)); if (mode != NULL) { mode->name = ""; mode->VScan = 1; /* divides refresh rate. default = 1 */ diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index a1a5527f4..ac287aa61 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -235,7 +235,7 @@ ApplyAccelerationSettings(DeviceIntPtr dev){ local->name, scheme); } - xfree(schemeStr); + free(schemeStr); /* process special configuration */ switch (scheme) { @@ -612,7 +612,7 @@ MergeInputClasses(IDevPtr idev, InputAttributes *attrs) /* Apply options to device with InputClass settings preferred. */ if (classdriver) { - xfree(idev->driver); + free(idev->driver); idev->driver = xstrdup(classdriver); if (!idev->driver) { xf86Msg(X_ERROR, "Failed to allocate memory while merging " @@ -762,7 +762,7 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, int rval = Success; int is_auto = 0; - idev = xcalloc(sizeof(*idev), 1); + idev = calloc(sizeof(*idev), 1); if (!idev) return BadAlloc; @@ -844,11 +844,11 @@ unwind: if (is_auto && !xf86Info.autoAddDevices) xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n"); if(idev->driver) - xfree(idev->driver); + free(idev->driver); if(idev->identifier) - xfree(idev->identifier); + free(idev->identifier); xf86optionListFree(idev->commonOptions); - xfree(idev); + free(idev); return rval; } @@ -884,10 +884,10 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) if (!(*it)) /* end of list, not in the layout */ { - xfree(idev->driver); - xfree(idev->identifier); + free(idev->driver); + free(idev->identifier); xf86optionListFree(idev->commonOptions); - xfree(idev); + free(idev); } } OsReleaseSignals(); diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c index e266ffb6d..f59ffcb70 100644 --- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -155,17 +155,17 @@ Bool xf86HandleColormaps( elements = 1 << sigRGBbits; - if(!(gamma = xalloc(elements * sizeof(LOCO)))) + if(!(gamma = malloc(elements * sizeof(LOCO)))) return FALSE; - if(!(indices = xalloc(maxColors * sizeof(int)))) { - xfree(gamma); + if(!(indices = malloc(maxColors * sizeof(int)))) { + free(gamma); return FALSE; } - if(!(pScreenPriv = xalloc(sizeof(CMapScreenRec)))) { - xfree(gamma); - xfree(indices); + if(!(pScreenPriv = malloc(sizeof(CMapScreenRec)))) { + free(gamma); + free(indices); return FALSE; } @@ -261,11 +261,11 @@ CMapAllocateColormapPrivate(ColormapPtr pmap) else numColors = 1 << pmap->pVisual->nplanes; - if(!(colors = xalloc(numColors * sizeof(LOCO)))) + if(!(colors = malloc(numColors * sizeof(LOCO)))) return FALSE; - if(!(pColPriv = xalloc(sizeof(CMapColormapRec)))) { - xfree(colors); + if(!(pColPriv = malloc(sizeof(CMapColormapRec)))) { + free(colors); return FALSE; } @@ -277,7 +277,7 @@ CMapAllocateColormapPrivate(ColormapPtr pmap) pColPriv->overscan = -1; /* add map to list */ - pLink = xalloc(sizeof(CMapLink)); + pLink = malloc(sizeof(CMapLink)); if(pLink) { pLink->cmap = pmap; pLink->next = pScreenPriv->maps; @@ -316,8 +316,8 @@ CMapDestroyColormap (ColormapPtr cmap) CMapLinkPtr prevLink = NULL, pLink = pScreenPriv->maps; if(pColPriv) { - if(pColPriv->colors) xfree(pColPriv->colors); - xfree(pColPriv); + if(pColPriv->colors) free(pColPriv->colors); + free(pColPriv); } /* remove map from list */ @@ -327,7 +327,7 @@ CMapDestroyColormap (ColormapPtr cmap) prevLink->next = pLink->next; else pScreenPriv->maps = pLink->next; - xfree(pLink); + free(pLink); break; } prevLink = pLink; @@ -828,9 +828,9 @@ CMapUnwrapScreen(ScreenPtr pScreen) pScrn->SetDGAMode = pScreenPriv->SetDGAMode; pScrn->ChangeGamma = pScreenPriv->ChangeGamma; - xfree(pScreenPriv->gamma); - xfree(pScreenPriv->PreAllocIndices); - xfree(pScreenPriv); + free(pScreenPriv->gamma); + free(pScreenPriv->PreAllocIndices); + free(pScreenPriv); } diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c index 5b8871723..a142abebc 100644 --- a/hw/xfree86/common/xf86fbman.c +++ b/hw/xfree86/common/xf86fbman.c @@ -323,10 +323,10 @@ localRegisterFreeBoxCallback( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - newCallbacks = xrealloc( offman->FreeBoxesUpdateCallback, + newCallbacks = realloc( offman->FreeBoxesUpdateCallback, sizeof(FreeBoxCallbackProcPtr) * (offman->NumCallbacks + 1)); - newPrivates = xrealloc(offman->devPrivates, + newPrivates = realloc(offman->devPrivates, sizeof(DevUnion) * (offman->NumCallbacks + 1)); if(!newCallbacks || !newPrivates) @@ -375,7 +375,7 @@ AllocateArea( if(((boxp->y2 - boxp->y1) < h) || ((boxp->x2 - x) < w)) continue; - link = xalloc(sizeof(FBLink)); + link = malloc(sizeof(FBLink)); if(!link) return NULL; area = &(link->area); @@ -485,7 +485,7 @@ localFreeOffscreenArea(FBAreaPtr area) pLinkPrev->next = pLink->next; else offman->UsedAreas = pLink->next; - xfree(pLink); + free(pLink); offman->NumUsedAreas--; SendCallFreeBoxCallbacks(offman); @@ -583,7 +583,7 @@ localResizeOffscreenArea( pLink->next = offman->UsedAreas; offman->UsedAreas = pLink; - xfree(newLink); + free(newLink); /* AllocateArea added one but we really only exchanged one */ offman->NumUsedAreas--; @@ -751,7 +751,7 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) tmp = pLink; pLink = pLink->next; - xfree(tmp); + free(tmp); offman->NumUsedAreas--; anyUsed = TRUE; } else { @@ -799,7 +799,7 @@ LinearRemoveCBWrapper(FBAreaPtr area) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; - xfree(pLink); + free(pLink); } static void @@ -854,7 +854,7 @@ AllocateLinear( /* break left */ if (offset > linear->linear.offset) { - newlink = xalloc(sizeof(FBLinearLink)); + newlink = malloc(sizeof(FBLinearLink)); if (!newlink) return NULL; newlink->area = NULL; @@ -869,7 +869,7 @@ AllocateLinear( /* break right */ if (size < linear->linear.size) { - newlink = xalloc(sizeof(FBLinearLink)); + newlink = malloc(sizeof(FBLinearLink)); if (!newlink) return NULL; newlink->area = NULL; @@ -920,7 +920,7 @@ localAllocateOffscreenLinear( DebugF("NOPE, ALLOCATING AREA\n"); - if(!(link = xalloc(sizeof(FBLinearLink)))) + if(!(link = malloc(sizeof(FBLinearLink)))) return NULL; /* No linear available, so try and pinch some from the XY areas */ @@ -930,7 +930,7 @@ localAllocateOffscreenLinear( if (gran > 1) { if (gran > pitch) { /* we can't match the specified alignment with XY allocations */ - xfree(link); + free(link); return NULL; } @@ -970,7 +970,7 @@ localAllocateOffscreenLinear( linear->RemoveLinearCallback = removeCB; linear->devPrivate.ptr = privData; } else - xfree(link); + free(link); DumpDebug(offman->LinearAreas); @@ -1002,7 +1002,7 @@ localFreeOffscreenLinear(FBLinearPtr linear) if(pLinkPrev) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; - xfree(pLink); + free(pLink); DumpDebug(offman->LinearAreas); return; } @@ -1161,22 +1161,22 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) while(pLink) { tmp = pLink; pLink = pLink->next; - xfree(tmp); + free(tmp); } pLinearLink = offman->LinearAreas; while(pLinearLink) { tmp2 = pLinearLink; pLinearLink = pLinearLink->next; - xfree(tmp2); + free(tmp2); } REGION_DESTROY(pScreen, offman->InitialBoxes); REGION_DESTROY(pScreen, offman->FreeBoxes); - xfree(offman->FreeBoxesUpdateCallback); - xfree(offman->devPrivates); - xfree(offman); + free(offman->FreeBoxesUpdateCallback); + free(offman->devPrivates); + free(offman); dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, NULL); return (*pScreen->CloseScreen) (i, pScreen); @@ -1324,7 +1324,7 @@ xf86InitFBManagerRegion( if(!xf86RegisterOffscreenManager(pScreen, &xf86FBManFuncs)) return FALSE; - offman = xalloc(sizeof(FBManager)); + offman = malloc(sizeof(FBManager)); if(!offman) return FALSE; dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, offman); @@ -1368,7 +1368,7 @@ xf86InitFBManagerLinear( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - offman->LinearAreas = xalloc(sizeof(FBLinearLink)); + offman->LinearAreas = malloc(sizeof(FBLinearLink)); if (!offman->LinearAreas) return FALSE; diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index ac018e739..3b30d720e 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -212,7 +212,7 @@ xf86PciProbe(void) xf86ErrorF("\n"); } - xfree(xf86PciVideoInfo); + free(xf86PciVideoInfo); } /* @@ -293,7 +293,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) s = xstrdup(id); p = strtok(s, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return FALSE; } d = strpbrk(p, "@"); @@ -301,14 +301,14 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) *(d++) = 0; for (i = 0; d[i] != 0; i++) { if (!isdigit(d[i])) { - xfree(s); + free(s); return FALSE; } } } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { - xfree(s); + free(s); return FALSE; } } @@ -317,12 +317,12 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) *bus += atoi(d) << 8; p = strtok(NULL, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return FALSE; } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { - xfree(s); + free(s); return FALSE; } } @@ -330,17 +330,17 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) *func = 0; p = strtok(NULL, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return TRUE; } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { - xfree(s); + free(s); return FALSE; } } *func = atoi(p); - xfree(s); + free(s); return TRUE; } diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index 7b23233aa..ea8c3e154 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -85,7 +85,7 @@ xf86SbusProbe(void) char fbDevName[32]; sbusDevicePtr psdp, *psdpp; - xf86SbusInfo = xalloc(sizeof(psdp)); + xf86SbusInfo = malloc(sizeof(psdp)); *xf86SbusInfo = NULL; for (i = 0; i < 32; i++) { sprintf(fbDevName, "/dev/fb%d", i); @@ -210,7 +210,7 @@ xf86SbusProbe(void) promPath = sparcPromNode2Pathname (&psdp->node); if (promPath) { xf86ErrorF(" at %s", promPath); - xfree(promPath); + free(promPath); } } else xf86Msg(X_PROBED, "SBUS: %s", psdp->descr); @@ -397,7 +397,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, * allow the config file to override this. */ if (allocatedInstances <= 0) { - xfree(instances); + free(instances); return 0; } @@ -419,7 +419,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, pGDev->chipID = pGDev->chipRev = -1; } } - xfree(instances); + free(instances); if (useProm) sparcPromClose(); return actualcards; @@ -479,7 +479,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, instances[i].dev = dev; } if (promPath) - xfree(promPath); + free(promPath); } DebugF("%s instances found: %d\n", driverName, numClaimedInstances); @@ -506,7 +506,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, = xf86ClaimSbusSlot(psdp, drvp, instances[i].dev,instances[i].dev->active ? TRUE : FALSE); } - xfree(instances); + free(instances); if (numFound > 0) { *foundEntities = retEntities; } @@ -607,7 +607,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, int i, index; sbusCmapPtr cmap; struct fbcmap fbcmap; - unsigned char *data = xalloc(numColors*3); + unsigned char *data = malloc(numColors*3); cmap = SBUSCMAPPTR(pScrn->pScreen); if (!cmap) return; @@ -628,7 +628,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, fbcmap.blue[fbcmap.count++] = colors[index].blue; } ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); - xfree(data); + free(data); } static Bool @@ -647,7 +647,7 @@ xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen) ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); } pScreen->CloseScreen = cmap->CloseScreen; - xfree (cmap); + free(cmap); return (*pScreen->CloseScreen) (i, pScreen); } diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index 2cc2f6093..99d1fdf73 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -138,7 +138,7 @@ xf86XVRegisterGenericAdaptorDriver( ){ xf86XVInitGenericAdaptorPtr *newdrivers; - newdrivers = xrealloc(GenDrivers, sizeof(xf86XVInitGenericAdaptorPtr) * + newdrivers = realloc(GenDrivers, sizeof(xf86XVInitGenericAdaptorPtr) * (1 + NumGenDrivers)); if (!newdrivers) return 0; @@ -168,7 +168,7 @@ xf86XVListGenericAdaptors( n = (*GenDrivers[i])(pScrn, &DrivAdap); if (0 == n) continue; - new = xrealloc(*adaptors, sizeof(XF86VideoAdaptorPtr) * (num+n)); + new = realloc(*adaptors, sizeof(XF86VideoAdaptorPtr) * (num+n)); if (NULL == new) continue; *adaptors = new; @@ -225,13 +225,13 @@ xf86XVQueryOffscreenImages( XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn) { - return xcalloc(1, sizeof(XF86VideoAdaptorRec)); + return calloc(1, sizeof(XF86VideoAdaptorRec)); } void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr) { - xfree(ptr); + free(ptr); } @@ -267,7 +267,7 @@ xf86XVScreenInit( a CloseScreen hook so that we don't have to wrap it. I'm not sure that I appreciate that. */ - ScreenPriv = xalloc(sizeof(XF86XVScreenRec)); + ScreenPriv = malloc(sizeof(XF86XVScreenRec)); pxvs->devPriv.ptr = (pointer)ScreenPriv; if(!ScreenPriv) return FALSE; @@ -302,17 +302,17 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; - xfree(pAdaptor->name); + free(pAdaptor->name); if(pAdaptor->pEncodings) { XvEncodingPtr pEncode = pAdaptor->pEncodings; for(i = 0; i < pAdaptor->nEncodings; i++, pEncode++) - xfree(pEncode->name); - xfree(pAdaptor->pEncodings); + free(pEncode->name); + free(pAdaptor->pEncodings); } - xfree(pAdaptor->pFormats); + free(pAdaptor->pFormats); if(pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; @@ -325,22 +325,22 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip); if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip); - xfree(pPriv); + free(pPriv); } } - xfree(pAdaptor->pPorts); + free(pAdaptor->pPorts); } if(pAdaptor->nAttributes) { XvAttributePtr pAttribute = pAdaptor->pAttributes; for(i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) - xfree(pAttribute->name); - xfree(pAdaptor->pAttributes); + free(pAttribute->name); + free(pAdaptor->pAttributes); } - xfree(pAdaptor->pImages); - xfree(pAdaptor->devPriv.ptr); + free(pAdaptor->pImages); + free(pAdaptor->devPriv.ptr); } static Bool @@ -374,7 +374,7 @@ xf86XVInitAdaptors( pxvs->nAdaptors = 0; pxvs->pAdaptors = NULL; - if(!(pAdaptor = xcalloc(number, sizeof(XvAdaptorRec)))) + if(!(pAdaptor = calloc(number, sizeof(XvAdaptorRec)))) return FALSE; for(pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) { @@ -424,18 +424,18 @@ xf86XVInitAdaptors( pa->ddGetPortAttribute = xf86XVGetPortAttribute; pa->ddQueryBestSize = xf86XVQueryBestSize; pa->ddQueryImageAttributes = xf86XVQueryImageAttributes; - if((pa->name = xalloc(strlen(adaptorPtr->name) + 1))) + if((pa->name = malloc(strlen(adaptorPtr->name) + 1))) strcpy(pa->name, adaptorPtr->name); if(adaptorPtr->nEncodings && - (pEncode = xcalloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { + (pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { for(pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0; i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++) { pe->id = encodingPtr->id; pe->pScreen = pScreen; - if((pe->name = xalloc(strlen(encodingPtr->name) + 1))) + if((pe->name = malloc(strlen(encodingPtr->name) + 1))) strcpy(pe->name, encodingPtr->name); pe->width = encodingPtr->width; pe->height = encodingPtr->height; @@ -447,7 +447,7 @@ xf86XVInitAdaptors( } if(adaptorPtr->nImages && - (pImage = xcalloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { + (pImage = calloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { for(i = 0, pi = pImage, imagePtr = adaptorPtr->pImages; i < adaptorPtr->nImages; i++, pi++, imagePtr++) @@ -480,7 +480,7 @@ xf86XVInitAdaptors( } if(adaptorPtr->nAttributes && - (pAttribute = xcalloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) + (pAttribute = calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) { for(pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0; i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) @@ -488,7 +488,7 @@ xf86XVInitAdaptors( pat->flags = attributePtr->flags; pat->min_value = attributePtr->min_value; pat->max_value = attributePtr->max_value; - if((pat->name = xalloc(strlen(attributePtr->name) + 1))) + if((pat->name = malloc(strlen(attributePtr->name) + 1))) strcpy(pat->name, attributePtr->name); } pa->nAttributes = adaptorPtr->nAttributes; @@ -498,7 +498,7 @@ xf86XVInitAdaptors( totFormat = adaptorPtr->nFormats; - if(!(pFormat = xcalloc(totFormat, sizeof(XvFormatRec)))) { + if(!(pFormat = calloc(totFormat, sizeof(XvFormatRec)))) { xf86XVFreeAdaptor(pa); continue; } @@ -515,7 +515,7 @@ xf86XVInitAdaptors( if(numFormat >= totFormat) { void *moreSpace; totFormat *= 2; - moreSpace = xrealloc(pFormat, + moreSpace = realloc(pFormat, totFormat * sizeof(XvFormatRec)); if(!moreSpace) break; pFormat = moreSpace; @@ -538,7 +538,7 @@ xf86XVInitAdaptors( continue; } - if(!(adaptorPriv = xcalloc(1, sizeof(XvAdaptorRecPrivate)))) { + if(!(adaptorPriv = calloc(1, sizeof(XvAdaptorRecPrivate)))) { xf86XVFreeAdaptor(pa); continue; } @@ -558,7 +558,7 @@ xf86XVInitAdaptors( pa->devPriv.ptr = (pointer)adaptorPriv; - if(!(pPort = xcalloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { + if(!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { xf86XVFreeAdaptor(pa); continue; } @@ -568,11 +568,11 @@ xf86XVInitAdaptors( if(!(pp->id = FakeClientID(0))) continue; - if(!(portPriv = xcalloc(1, sizeof(XvPortRecPrivate)))) + if(!(portPriv = calloc(1, sizeof(XvPortRecPrivate)))) continue; if(!AddResource(pp->id, PortResource, pp)) { - xfree(portPriv); + free(portPriv); continue; } @@ -608,7 +608,7 @@ xf86XVInitAdaptors( pxvs->nAdaptors = numAdaptor; pxvs->pAdaptors = pAdaptor; } else { - xfree(pAdaptor); + free(pAdaptor); return FALSE; } @@ -976,7 +976,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) } if(!winPriv) { - winPriv = xcalloc(1, sizeof(XF86XVWindowRec)); + winPriv = calloc(1, sizeof(XF86XVWindowRec)); if(!winPriv) return BadAlloc; winPriv->PortRec = portPriv; winPriv->next = PrivRoot; @@ -1003,7 +1003,7 @@ xf86XVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) else dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, winPriv->next); - xfree(winPriv); + free(winPriv); break; } prevPriv = winPriv; @@ -1037,7 +1037,7 @@ xf86XVDestroyWindow(WindowPtr pWin) FreeGC(WinPriv->pGC, 0); } WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); } dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, NULL); @@ -1103,7 +1103,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } break; @@ -1159,7 +1159,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } } @@ -1208,8 +1208,8 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen) xf86XVFreeAdaptor(pa); } - xfree(pxvs->pAdaptors); - xfree(ScreenPriv); + free(pxvs->pAdaptors); + free(ScreenPriv); return TRUE; } @@ -1861,7 +1861,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y); - rects = xalloc(nbox * sizeof(xRectangle)); + rects = malloc(nbox * sizeof(xRectangle)); for(i = 0; i < nbox; i++, pbox++) { rects[i].x = pbox->x1; @@ -1874,7 +1874,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) if (!pPriv) FreeGC(pGC, 0); - xfree(rects); + free(rects); } void @@ -1895,7 +1895,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) (void) ChangeGC(gc, GCForeground|GCSubwindowMode, pval); ValidateGC(root, gc); - rects = xalloc (nbox * sizeof(xRectangle)); + rects = malloc(nbox * sizeof(xRectangle)); for(i = 0; i < nbox; i++, pbox++) { @@ -1907,7 +1907,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) (*gc->ops->PolyFillRect)(root, gc, nbox, rects); - xfree (rects); + free(rects); FreeScratchGC (gc); } diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c index 39d33da08..99d6695b8 100644 --- a/hw/xfree86/common/xf86xvmc.c +++ b/hw/xfree86/common/xf86xvmc.c @@ -149,8 +149,8 @@ xf86XvMCCloseScreen (int i, ScreenPtr pScreen) pScreen->CloseScreen = pScreenPriv->CloseScreen; - xfree(pScreenPriv->dixinfo); - xfree(pScreenPriv); + free(pScreenPriv->dixinfo); + free(pScreenPriv); return (*pScreen->CloseScreen)(i, pScreen); } @@ -169,11 +169,11 @@ Bool xf86XvMCScreenInit( if(!XvMCScreenInitProc) return FALSE; - if(!(pAdapt = xalloc(sizeof(XvMCAdaptorRec) * num_adaptors))) + if(!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors))) return FALSE; - if(!(pScreenPriv = xalloc(sizeof(xf86XvMCScreenRec)))) { - xfree(pAdapt); + if(!(pScreenPriv = malloc(sizeof(xf86XvMCScreenRec)))) { + free(pAdapt); return FALSE; } @@ -196,7 +196,7 @@ Bool xf86XvMCScreenInit( } if(!pAdapt[i].xv_adaptor) { /* no adaptor by that name */ - xfree(pAdapt); + free(pAdapt); return FALSE; } pAdapt[i].num_surfaces = (*adaptors)->num_surfaces; @@ -220,10 +220,10 @@ Bool xf86XvMCScreenInit( XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) { - return xcalloc(1, sizeof(XF86MCAdaptorRec)); + return calloc(1, sizeof(XF86MCAdaptorRec)); } void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) { - xfree(adaptor); + free(adaptor); } diff --git a/hw/xfree86/common/xisb.c b/hw/xfree86/common/xisb.c index 1cb9e4854..4455efd1d 100644 --- a/hw/xfree86/common/xisb.c +++ b/hw/xfree86/common/xisb.c @@ -67,13 +67,13 @@ XisbNew (int fd, ssize_t size) { XISBuffer *b; - b = xalloc (sizeof (XISBuffer)); + b = malloc(sizeof (XISBuffer)); if (!b) return (NULL); - b->buf = xalloc ((sizeof (unsigned char) * size)); + b->buf = malloc((sizeof (unsigned char) * size)); if (!b->buf) { - xfree (b); + free(b); return (NULL); } @@ -89,8 +89,8 @@ XisbNew (int fd, ssize_t size) void XisbFree (XISBuffer *b) { - xfree (b->buf); - xfree (b); + free(b->buf); + free(b); } int |