[PATCH] Cygwin: cwdstuff::get: clean up debug_printf output

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Aug 24 09:07:31 GMT 2020


On Aug 23 18:51, Ken Brown via Cygwin-patches wrote:
> 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.
> ---
>  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)
> -- 
> 2.28.0

Please push.


Thanks,
Corinna


More information about the Cygwin-patches mailing list