changeset 22530:6d2e22a16952

(x_list_fonts): Keep alloca usage simple.
author Karl Heuer <kwzh@gnu.org>
date Sat, 20 Jun 1998 22:17:48 +0000
parents d9eac134a41b
children ab25969db484
files src/xterm.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sat Jun 20 22:06:30 1998 +0000
+++ b/src/xterm.c	Sat Jun 20 22:17:48 1998 +0000
@@ -6474,10 +6474,12 @@
 	    {
 	      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);
 	    }