Commit 989f33ba authored by Paul Eggert's avatar Paul Eggert

* callproc.c: Don't assume string length fits in 'int.'

parent 965d34eb
2011-06-19 Paul Eggert <eggert@cs.ucla.edu>
* callproc.c (getenv_internal_1, getenv_internal)
(Fgetenv_internal):
* buffer.c (init_buffer): Don't assume string length fits in 'int'.
* lread.c (invalid_syntax): Omit length argument.
......
......@@ -1378,8 +1378,8 @@ relocate_fd (int fd, int minfd)
#endif /* not WINDOWSNT */
static int
getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen,
Lisp_Object env)
getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value,
ptrdiff_t *valuelen, Lisp_Object env)
{
for (; CONSP (env); env = XCDR (env))
{
......@@ -1413,8 +1413,8 @@ getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen,
}
static int
getenv_internal (const char *var, int varlen, char **value, int *valuelen,
Lisp_Object frame)
getenv_internal (const char *var, ptrdiff_t varlen, char **value,
ptrdiff_t *valuelen, Lisp_Object frame)
{
/* Try to find VAR in Vprocess_environment first. */
if (getenv_internal_1 (var, varlen, value, valuelen,
......@@ -1454,7 +1454,7 @@ If optional parameter ENV is a list, then search this list instead of
(Lisp_Object variable, Lisp_Object env)
{
char *value;
int valuelen;
ptrdiff_t valuelen;
CHECK_STRING (variable);
if (CONSP (env))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment