X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fgetpwd.c;h=fa5c132fd6b6e48c11efe723dfc492635ddc1522;hb=13aa5ceb01cc94a0e617f397c0c5434fc22bb1e5;hp=c7880d70444494763b89d429b3b3bd34d91f2978;hpb=2349f557002120404ac8b0adf2935e25c615e774;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/getpwd.c b/libiberty/getpwd.c index c7880d7044..fa5c132fd6 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