aboutsummaryrefslogtreecommitdiff
path: root/libiberty/getpwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/getpwd.c')
-rw-r--r--libiberty/getpwd.c4
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