HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More xmalloc and related cleanup.
[bpt/emacs.git]
/
src
/
callproc.c
diff --git
a/src/callproc.c
b/src/callproc.c
index
804af1e
..
39fcb99
100644
(file)
--- a/
src/callproc.c
+++ b/
src/callproc.c
@@
-97,8
+97,6
@@
int synch_process_retcode;
/* Nonzero if this is termination due to exit. */
static int call_process_exited;
/* Nonzero if this is termination due to exit. */
static int call_process_exited;
-static Lisp_Object Fgetenv_internal (Lisp_Object, Lisp_Object);
-
static Lisp_Object
call_process_kill (Lisp_Object fdpid)
{
static Lisp_Object
call_process_kill (Lisp_Object fdpid)
{
@@
-1174,9
+1172,9
@@
child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
/* MSDOS must have all environment variables malloc'ed, because
low-level libc functions that launch subsidiary processes rely
on that. */
/* MSDOS must have all environment variables malloc'ed, because
low-level libc functions that launch subsidiary processes rely
on that. */
- pwd_var =
(char *)
xmalloc (i + 6);
+ pwd_var = xmalloc (i + 6);
#else
#else
- pwd_var =
(char *)
alloca (i + 6);
+ pwd_var = alloca (i + 6);
#endif
temp = pwd_var + 4;
memcpy (pwd_var, "PWD=", 4);
#endif
temp = pwd_var + 4;
memcpy (pwd_var, "PWD=", 4);
@@
-1244,7
+1242,7
@@
child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
}
/* new_length + 2 to include PWD and terminating 0. */
}
/* new_length + 2 to include PWD and terminating 0. */
- env = new_env =
(char **) alloca ((new_length + 2) * sizeof (char *)
);
+ env = new_env =
alloca ((new_length + 2) * sizeof *env
);
/* If we have a PWD envvar, pass one down,
but with corrected value. */
if (egetenv ("PWD"))
/* If we have a PWD envvar, pass one down,
but with corrected value. */
if (egetenv ("PWD"))
@@
-1252,7
+1250,7
@@
child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
if (STRINGP (display))
{
if (STRINGP (display))
{
- char *vdata =
(char *)
alloca (sizeof "DISPLAY=" + SBYTES (display));
+ char *vdata = alloca (sizeof "DISPLAY=" + SBYTES (display));
strcpy (vdata, "DISPLAY=");
strcat (vdata, SSDATA (display));
new_env = add_env (env, new_env, vdata);
strcpy (vdata, "DISPLAY=");
strcat (vdata, SSDATA (display));
new_env = add_env (env, new_env, vdata);