2011-06-19 Paul Eggert <eggert@cs.ucla.edu>
+ * callproc.c (child_setup): Rewrite to avoid two strlen calls.
+
* process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
We prefer signed integers, even for size calculations.
if (STRINGP (display))
{
- int vlen = strlen ("DISPLAY=") + strlen (SSDATA (display)) + 1;
- char *vdata = (char *) alloca (vlen);
+ char *vdata = (char *) alloca (sizeof "DISPLAY=" + SBYTES (display));
strcpy (vdata, "DISPLAY=");
strcat (vdata, SSDATA (display));
new_env = add_env (env, new_env, vdata);