OSDN Git Service

Slight optimization.
authorcgf <cgf>
Sun, 9 Jul 2000 16:21:55 +0000 (16:21 +0000)
committercgf <cgf>
Sun, 9 Jul 2000 16:21:55 +0000 (16:21 +0000)
winsup/cygwin/fhandler.cc

index 579de96..04b4fb3 100644 (file)
@@ -265,7 +265,7 @@ fhandler_base::get_default_fmode (int flags)
          const char *stem = get_name () + nlen - pflen;
          if (pflen > nlen || (stem != get_name () && !isdirsep (stem[-1])))
            continue;
-         else if (strcasematch (stem, pf->name) && ACCFLAGS (pf->flags) == accflags)
+         else if (ACCFLAGS (pf->flags) == accflags && strcasematch (stem, pf->name))
            return pf->flags & ~(O_RDONLY | O_WRONLY | O_RDWR);
        }
     }