]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: fix return value of symlink_info::check
authorKen Brown <kbrown@cornell.edu>
Tue, 9 Aug 2022 19:14:07 +0000 (15:14 -0400)
committerKen Brown <kbrown@cornell.edu>
Tue, 9 Aug 2022 20:58:08 +0000 (16:58 -0400)
commit5cdf8ade2882b87b29d6fa66451b5d5497fa96b2
treefb18991108040dbbc84c5f7aeece6856d667c9af
parent34872ce1a11e3c24154dc2d2ab90c5eb6da47edb
Cygwin: fix return value of symlink_info::check

Currently it is possible for symlink_info::check to return -1 in case
we're searching for foo and find foo.lnk that is not a Cygwin symlink.
This contradicts the new meaning attached to a negative return value
in commit 19d59ce75d.  Fix this by setting "res" to 0 at the beginning
of the main loop and not seting it to -1 later.

Also fix the commentary preceding the function definition to reflect
the current behavior.

Addresses: https://cygwin.com/pipermail/cygwin/2022-August/252030.html
winsup/cygwin/path.cc
winsup/cygwin/release/3.3.6
This page took 0.028438 seconds and 5 git commands to generate.