aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2020-08-23 18:41:18 -0400
committerKen Brown <kbrown@cornell.edu>2020-08-23 18:50:00 -0400
commitc1f177d6a9e0b86f9ad22c49891fd2d60433e472 (patch)
tree0fbb1ac26483f828c51ae15c9cb04b4bd2de64f9
parentbb4285206207343984d975f735d15701fd3ed6e1 (diff)
downloadnewlib-c1f177d6a9e0b86f9ad22c49891fd2d60433e472.zip
newlib-c1f177d6a9e0b86f9ad22c49891fd2d60433e472.tar.gz
newlib-c1f177d6a9e0b86f9ad22c49891fd2d60433e472.tar.bz2
Cygwin: cwdstuff::get: clean up debug_printf output
Set errno = 0 at the beginning so that the debug_printf call at the end doesn't report a nonzero errno left over from some other function call.
-rw-r--r--winsup/cygwin/path.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index f3b9913..95faf8c 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -5022,6 +5022,8 @@ char *
cwdstuff::get (char *buf, int need_posix, int with_chroot, unsigned ulen)
{
tmp_pathbuf tp;
+
+ errno = 0;
if (ulen)
/* nothing */;
else if (buf == NULL)