diff options
author | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
commit | abf6a75b428517d9caaf9155212b0b10e0379a99 (patch) | |
tree | 3476694dba1d2c731deb2a131b0d8d6c5dcb0cd3 /libiberty/getpwd.c | |
parent | f127898a4db12540b9898e25777c6c3725d119bf (diff) | |
download | gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.zip gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.gz gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/getpwd.c')
-rw-r--r-- | libiberty/getpwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/getpwd.c b/libiberty/getpwd.c index c7880d7..fa5c132 100644 --- a/libiberty/getpwd.c +++ b/libiberty/getpwd.c @@ -84,7 +84,7 @@ getpwd (void) && dotstat.st_dev == pwdstat.st_dev)) /* The shortcut didn't work. Try the slow, ``sure'' way. */ - for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2) + for (s = GUESSPATHLEN; !getcwd (p = XNEWVEC (char, s), s); s *= 2) { int e = errno; free (p); @@ -117,7 +117,7 @@ getpwd (void) static char *pwd = 0; if (!pwd) - pwd = getcwd (xmalloc (MAXPATHLEN + 1), MAXPATHLEN + 1 + pwd = getcwd (XNEWVEC (char, MAXPATHLEN + 1), MAXPATHLEN + 1 #ifdef VMS , 0 #endif |