* cygheap.cc (cygheap_user::set_name): Revert previous change.

* environ.cc (spenv::retrieve): Check return value of call to
	cygheap->user.*from_cygheap().
This commit is contained in:
Corinna Vinschen 2002-06-13 16:30:18 +00:00
parent 1f1fb4210d
commit 0e6d80e4fa
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-06-13 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_user::set_name): Revert previous change.
* environ.cc (spenv::retrieve): Check return value of call to
cygheap->user.*from_cygheap().
2002-06-13 Corinna Vinschen <corinna@vinschen.de> 2002-06-13 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_user::set_name): Remove setting homedrive and * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and

View File

@ -443,6 +443,8 @@ cygheap_user::set_name (const char *new_name)
if (pname) if (pname)
cfree (pname); cfree (pname);
pname = cstrdup (new_name ? new_name : ""); pname = cstrdup (new_name ? new_name : "");
homedrive = NULL;
homepath = NULL;
} }
void void

View File

@ -786,7 +786,8 @@ spenv::retrieve (bool no_envblock, const char *const envname, int len)
/* Make a FOO=BAR entry from the value returned by the cygheap_user /* Make a FOO=BAR entry from the value returned by the cygheap_user
method. */ method. */
p = (cygheap->user.*from_cygheap) (); if (!(p = (cygheap->user.*from_cygheap) ()))
return NULL;
int namelen = strlen (name); int namelen = strlen (name);
char *s = (char *) cmalloc (HEAP_1_STR, namelen + strlen (p) + 1); char *s = (char *) cmalloc (HEAP_1_STR, namelen + strlen (p) + 1);
strcpy (s, name); strcpy (s, name);