public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: cwdstuff::get: clean up debug_printf output
@ 2020-08-24 12:31 Ken Brown
0 siblings, 0 replies; only message in thread
From: Ken Brown @ 2020-08-24 12:31 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c1f177d6a9e0b86f9ad22c49891fd2d60433e472
commit c1f177d6a9e0b86f9ad22c49891fd2d60433e472
Author: Ken Brown <kbrown@cornell.edu>
Date: Sun Aug 23 18:41:18 2020 -0400
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.
Diff:
---
winsup/cygwin/path.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index f3b9913bd..95faf8ca7 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-24 12:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 12:31 [newlib-cygwin] Cygwin: cwdstuff::get: clean up debug_printf output Ken Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).