mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOSKRNL]
For both FsRtlIsNameInExpression & FsRtlIsDbcsInExpression: - Get back "useless checks" (tests show they weren't that useless) - Prevent code redundancy This fixes 4 failing kmtest tests added in r50679 svn path=/trunk/; revision=50680
This commit is contained in:
parent
05ec891399
commit
d4e44f51ea
2 changed files with 18 additions and 24 deletions
|
@ -184,15 +184,7 @@ FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
|
|||
else if (Expression->Buffer[ExpressionPosition] == '*')
|
||||
{
|
||||
StarFound = ExpressionPosition++;
|
||||
if (StarFound < (Expression->Length - 1))
|
||||
{
|
||||
while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] &&
|
||||
NamePosition < Name->Length)
|
||||
{
|
||||
NamePosition++;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (ExpressionPosition == Expression->Length)
|
||||
{
|
||||
NamePosition = Name->Length;
|
||||
}
|
||||
|
@ -214,10 +206,15 @@ FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
|
|||
else if (StarFound != MAXUSHORT)
|
||||
{
|
||||
ExpressionPosition = StarFound + 1;
|
||||
while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] &&
|
||||
NamePosition < Name->Length)
|
||||
if (Expression->Buffer[ExpressionPosition] != '*' && Expression->Buffer[ExpressionPosition] != '?' &&
|
||||
Expression->Buffer[ExpressionPosition] != ANSI_DOS_DOT && Expression->Buffer[ExpressionPosition] != ANSI_DOS_QM &&
|
||||
Expression->Buffer[ExpressionPosition] != ANSI_DOS_STAR)
|
||||
{
|
||||
NamePosition++;
|
||||
while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] &&
|
||||
NamePosition < Name->Length)
|
||||
{
|
||||
NamePosition++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -44,15 +44,7 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
|
|||
else if (Expression->Buffer[ExpressionPosition] == L'*')
|
||||
{
|
||||
StarFound = ExpressionPosition++;
|
||||
if (StarFound < (Expression->Length / sizeof(WCHAR) - 1))
|
||||
{
|
||||
while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] &&
|
||||
NamePosition < Name->Length / sizeof(WCHAR))
|
||||
{
|
||||
NamePosition++;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (ExpressionPosition == Expression->Length / sizeof(WCHAR))
|
||||
{
|
||||
NamePosition = Name->Length / sizeof(WCHAR);
|
||||
}
|
||||
|
@ -74,10 +66,15 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
|
|||
else if (StarFound != MAXUSHORT)
|
||||
{
|
||||
ExpressionPosition = StarFound + 1;
|
||||
while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] &&
|
||||
NamePosition < Name->Length / sizeof(WCHAR))
|
||||
if (Expression->Buffer[ExpressionPosition] != L'*' && Expression->Buffer[ExpressionPosition] != L'?' &&
|
||||
Expression->Buffer[ExpressionPosition] != DOS_DOT && Expression->Buffer[ExpressionPosition] != DOS_QM &&
|
||||
Expression->Buffer[ExpressionPosition] != DOS_STAR)
|
||||
{
|
||||
NamePosition++;
|
||||
while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] &&
|
||||
NamePosition < Name->Length / sizeof(WCHAR))
|
||||
{
|
||||
NamePosition++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue