mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
(x_list_fonts): Keep alloca usage simple.
This commit is contained in:
parent
94487c4e37
commit
01c752b506
1 changed files with 3 additions and 1 deletions
|
|
@ -6474,10 +6474,12 @@ x_list_fonts (f, pattern, size, maxnames)
|
|||
{
|
||||
char *name = (char *) XGetAtomName (dpy, (Atom) value);
|
||||
int len = strlen (name);
|
||||
char *tmp;
|
||||
|
||||
num_fonts = 1;
|
||||
names = alloca (sizeof (char *));
|
||||
names[0] = alloca (len + 1);
|
||||
/* Some systems only allow alloca assigned to a simple var. */
|
||||
tmp = alloca (len + 1); names[0] = tmp;
|
||||
bcopy (name, names[0], len + 1);
|
||||
XFree (name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue