From 2352ea6662418de2fe7bdc480a40a4599e9e2af4 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 19 Feb 2011 13:58:55 +0000 Subject: [PATCH] [NTOSKRNL] - No need to use ULONG when dealing with strings, USHORT is enough. This makes MSVC warnings silent. - Fix a really nasty bug in FsRtlIsHpfsDbcsLegal() svn path=/trunk/; revision=50817 --- reactos/ntoskrnl/fsrtl/dbcsname.c | 12 ++++++------ reactos/ntoskrnl/fsrtl/name.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/reactos/ntoskrnl/fsrtl/dbcsname.c b/reactos/ntoskrnl/fsrtl/dbcsname.c index 9311caef9f5..d99fa191c0a 100644 --- a/reactos/ntoskrnl/fsrtl/dbcsname.c +++ b/reactos/ntoskrnl/fsrtl/dbcsname.c @@ -46,8 +46,8 @@ FsRtlDissectDbcs(IN ANSI_STRING Name, OUT PANSI_STRING FirstPart, OUT PANSI_STRING RemainingPart) { - ULONG FirstPosition, i; - ULONG SkipFirstSlash = 0; + USHORT FirstPosition, i; + USHORT SkipFirstSlash = 0; PAGED_CODE(); /* Zero the strings before continuing */ @@ -116,7 +116,7 @@ BOOLEAN NTAPI FsRtlDoesDbcsContainWildCards(IN PANSI_STRING Name) { - ULONG i; + USHORT i; PAGED_CODE(); /* Check every character */ @@ -300,7 +300,7 @@ FsRtlIsFatDbcsLegal(IN ANSI_STRING DbcsName, { ANSI_STRING FirstPart, RemainingPart, Name; BOOLEAN LastDot; - ULONG i; + USHORT i; PAGED_CODE(); /* Just quit if the string is empty */ @@ -437,7 +437,7 @@ FsRtlIsHpfsDbcsLegal(IN ANSI_STRING DbcsName, IN BOOLEAN LeadingBackslashPermissible) { ANSI_STRING FirstPart, RemainingPart, Name; - ULONG i; + USHORT i; PAGED_CODE(); /* Just quit if the string is empty */ @@ -490,7 +490,7 @@ FsRtlIsHpfsDbcsLegal(IN ANSI_STRING DbcsName, i++; } /* Then check for bad characters */ - else if (!!FsRtlIsAnsiCharacterLegalHpfs(FirstPart.Buffer[i], WildCardsPermissible)) + else if (!FsRtlIsAnsiCharacterLegalHpfs(FirstPart.Buffer[i], WildCardsPermissible)) { return FALSE; } diff --git a/reactos/ntoskrnl/fsrtl/name.c b/reactos/ntoskrnl/fsrtl/name.c index 8868ecc714d..29f6e90d76c 100644 --- a/reactos/ntoskrnl/fsrtl/name.c +++ b/reactos/ntoskrnl/fsrtl/name.c @@ -163,7 +163,7 @@ FsRtlAreNamesEqual(IN PCUNICODE_STRING Name1, UNICODE_STRING UpcaseName1; UNICODE_STRING UpcaseName2; BOOLEAN StringsAreEqual, MemoryAllocated = FALSE; - ULONG i; + USHORT i; NTSTATUS Status; PAGED_CODE(); @@ -255,8 +255,8 @@ FsRtlDissectName(IN UNICODE_STRING Name, OUT PUNICODE_STRING FirstPart, OUT PUNICODE_STRING RemainingPart) { - ULONG FirstPosition, i; - ULONG SkipFirstSlash = 0; + USHORT FirstPosition, i; + USHORT SkipFirstSlash = 0; PAGED_CODE(); /* Zero the strings before continuing */