From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2210) id 314473865C2A; Mon, 24 Aug 2020 12:31:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 314473865C2A Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ken Brown To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: cwdstuff::get: clean up debug_printf output X-Act-Checkin: newlib-cygwin X-Git-Author: Ken Brown X-Git-Refname: refs/heads/master X-Git-Oldrev: bb4285206207343984d975f735d15701fd3ed6e1 X-Git-Newrev: c1f177d6a9e0b86f9ad22c49891fd2d60433e472 Message-Id: <20200824123128.314473865C2A@sourceware.org> Date: Mon, 24 Aug 2020 12:31:28 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 12:31:28 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c1f177d6a9e0b86f9ad22c49891fd2d60433e472 commit c1f177d6a9e0b86f9ad22c49891fd2d60433e472 Author: Ken Brown 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)