mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-30 17:00:23 +02:00
* random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
scm_malloc returning NULL, it never does that. * putenv.c (putenv): Likewise.
This commit is contained in:
parent
c224262bd1
commit
94b33dfe46
1 changed files with 1 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 2000, 2001, 2004 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -105,8 +105,6 @@ putenv (const char *string)
|
||||||
{
|
{
|
||||||
static char **last_environ = NULL;
|
static char **last_environ = NULL;
|
||||||
char **new_environ = (char **) scm_malloc ((size + 2) * sizeof (char *));
|
char **new_environ = (char **) scm_malloc ((size + 2) * sizeof (char *));
|
||||||
if (new_environ == NULL)
|
|
||||||
return -1;
|
|
||||||
memcpy ((char *) new_environ, (char *) environ, size * sizeof (char *));
|
memcpy ((char *) new_environ, (char *) environ, size * sizeof (char *));
|
||||||
new_environ[size] = (char *) string;
|
new_environ[size] = (char *) string;
|
||||||
new_environ[size + 1] = NULL;
|
new_environ[size + 1] = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue