diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-26 01:51:18 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:05:30 +0200 |
commit | 2646fc254e75c4a7fc10d03d1139d0bd708ceae9 (patch) | |
tree | 6a183ec2959f55cf8d6850d072b557399b401f7e /nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | |
parent | acf87144d019f18e646501657d9082c6eba77f54 (diff) | |
download | nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.tar.gz nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.tar.bz2 nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.zip |
nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index d15df9513..4b0af0867 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -442,7 +442,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) } if (err == FontNameAlias) { if (resolved) free(resolved); - resolved = (char *) xalloc(resolvedlen + 1); + resolved = (char *) malloc(resolvedlen + 1); if (resolved) memmove(resolved, tmpname, resolvedlen + 1); } @@ -497,7 +497,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) c->haveSaved = TRUE; if (c->savedName) free(c->savedName); - c->savedName = (char *)xalloc(namelen + 1); + c->savedName = (char *)malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); c->savedNameLen = namelen; @@ -638,10 +638,10 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, if (length > XLFDMAXFONTNAMELEN) return BadAlloc; - if (!(c = (LFclosurePtr) xalloc(sizeof *c))) + if (!(c = (LFclosurePtr) malloc(sizeof *c))) return BadAlloc; c->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + malloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { free(c); return BadAlloc; @@ -786,7 +786,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) c->savedNumFonts = numFonts; if (c->savedName) free(c->savedName); - c->savedName = (char *)xalloc(namelen + 1); + c->savedName = (char *)malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); aliascount = 20; @@ -1086,7 +1086,7 @@ nxdoListFontsAndAliases(client, fss) } if (err == FontNameAlias) { if (resolved) free(resolved); - resolved = (char *) xalloc(resolvedlen + 1); + resolved = (char *) malloc(resolvedlen + 1); if (resolved) { memmove(resolved, tmpname, resolvedlen); @@ -1155,7 +1155,7 @@ nxdoListFontsAndAliases(client, fss) c->haveSaved = TRUE; if (c->savedName) free(c->savedName); - c->savedName = (char *)xalloc(namelen + 1); + c->savedName = (char *)malloc(namelen + 1); if (c->savedName) { memmove(c->savedName, name, namelen); @@ -1275,7 +1275,7 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) #ifdef FONTDEBUG char *f; - f = (char *)xalloc(lenfname + 1); + f = (char *)malloc(lenfname + 1); memmove(f, pfontname, lenfname); f[lenfname] = '\0'; ErrorF("OpenFont: fontname is \"%s\"\n", f); @@ -1312,16 +1312,16 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) return Success; } } - if (!(fss = (nxFsPtr) xalloc(sizeof(nxFs)))) + if (!(fss = (nxFsPtr) malloc(sizeof(nxFs)))) return BadAlloc; - if (!(c = (LFclosurePtr) xalloc(sizeof *c))) + if (!(c = (LFclosurePtr) malloc(sizeof *c))) { free(fss); return BadAlloc; } c->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + malloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { free(c); free(fss); @@ -1351,7 +1351,7 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) c->slept = FALSE; c->savedName = 0; - oc = (OFclosurePtr) xalloc(sizeof(OFclosureRec)); + oc = (OFclosurePtr) malloc(sizeof(OFclosureRec)); if (!oc) { for (i = 0; i < c->num_fpes; i++) @@ -1361,7 +1361,7 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) free(fss); return BadAlloc; } - oc->fontname = (char *) xalloc(256);/* I don't want to deal with future reallocs errors */ + oc->fontname = (char *) malloc(256);/* I don't want to deal with future reallocs errors */ oc->origFontName = pfontname; oc->origFontNameLen = lenfname; if (!oc->fontname) { @@ -1378,7 +1378,7 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) * while we're blocking, the request still appears atomic */ oc->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + malloc(sizeof(FontPathElementPtr) * num_fpes); if (!oc->fpe_list) { free(oc->fontname); free(oc); |