* path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when input is

"foo".
This commit is contained in:
Christopher Faylor 2001-03-17 17:44:53 +00:00
parent 298fad4623
commit 57499703f2
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Sat Mar 17 12:43:15 2001 Christopher Faylor <cgf@cygnus.com>
* path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
input is "foo".
Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de> Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_socket): Set protocol to 0 when address family is * net.cc (cygwin_socket): Set protocol to 0 when address family is

View File

@ -2472,10 +2472,14 @@ suffix_scan::next ()
{ {
case SCAN_BEG: case SCAN_BEG:
suffixes = suffixes_start; suffixes = suffixes_start;
if (suffixes) if (!suffixes)
nextstate = SCAN_EXTRALNK;
else
nextstate = SCAN_LNK; nextstate = SCAN_LNK;
else
{
if (!*suffixes->name)
suffixes++;
nextstate = SCAN_EXTRALNK;
}
return 1; return 1;
case SCAN_HASLNK: case SCAN_HASLNK:
nextstate = SCAN_EXTRALNK; /* Skip SCAN_BEG */ nextstate = SCAN_EXTRALNK; /* Skip SCAN_BEG */