summaryrefslogtreecommitdiff
path: root/libguile/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/posix.c')
-rw-r--r--libguile/posix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/posix.c b/libguile/posix.c
index 2d9d98038..309fa7ab6 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1134,13 +1134,13 @@ SCM_DEFINE (scm_putenv, "putenv", 1, 0, 0,
int rv;
char *ptr;
- SCM_VALIDATE_ROSTRING (1,str);
+ SCM_VALIDATE_STRING (1, str);
/* must make a new copy to be left in the environment, safe from gc. */
- ptr = malloc (SCM_LENGTH (str) + 1);
+ ptr = malloc (SCM_STRING_LENGTH (str) + 1);
if (ptr == NULL)
SCM_MEMORY_ERROR;
- strncpy (ptr, SCM_ROCHARS (str), SCM_LENGTH (str));
- ptr[SCM_LENGTH(str)] = 0;
+ strncpy (ptr, SCM_ROCHARS (str), SCM_STRING_LENGTH (str));
+ ptr[SCM_STRING_LENGTH (str)] = 0;
rv = putenv (ptr);
if (rv < 0)
SCM_SYSERROR;