/* This malloc will not be freed, but it is only done once, and hopefully
not very large */
emacs_program = xmalloc (name_len + 1);
- emacs_program[0] = '\0';
+ char *z = emacs_program;
if (! EQ (Vinvocation_directory, Qnil))
- lispstpcpy (emacs_program, Vinvocation_directory);
- strcat (emacs_program, SSDATA (Vinvocation_name));
+ z = lispstpcpy (z, Vinvocation_directory);
+ lispstpcpy (z, Vinvocation_name);
/* The SM protocol says all callbacks are mandatory, so set up all
here and in the mask passed to SmcOpenConnection. */