aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1998-06-20 22:17:48 +0000
committerKarl Heuer <[email protected]>1998-06-20 22:17:48 +0000
commit01c752b506dc29fb5532dc56ab581bfecc703875 (patch)
tree98700ed6408868b59e73c3920225f2d10bfc5fa8 /src
parent94487c4e376640bab3281d19b19bbca531ab78ec (diff)
(x_list_fonts): Keep alloca usage simple.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 582eb2fd5f..868c8688e4 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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);
}