From 155e603f1990a0ef9d6a3903b017e05ac12634f4 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 21 Jan 2006 22:36:37 +0000 Subject: [PATCH] rename a variable to avoid conflicts with an existing information class constant svn path=/trunk/; revision=20964 --- reactos/lib/kernel32/file/file.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/reactos/lib/kernel32/file/file.c b/reactos/lib/kernel32/file/file.c index e0c78c3dfa2..238a27e94da 100644 --- a/reactos/lib/kernel32/file/file.c +++ b/reactos/lib/kernel32/file/file.c @@ -1432,7 +1432,7 @@ SetFileShortNameW( ULONG NeededSize; UNICODE_STRING ShortName; IO_STATUS_BLOCK IoStatusBlock; - PFILE_NAME_INFORMATION FileNameInformation; + PFILE_NAME_INFORMATION FileNameInfo; if(IsConsoleHandle(hFile)) { @@ -1449,29 +1449,29 @@ SetFileShortNameW( RtlInitUnicodeString(&ShortName, lpShortName); NeededSize = sizeof(FILE_NAME_INFORMATION) + ShortName.Length + sizeof(WCHAR); - if(!(FileNameInformation = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, NeededSize))) + if(!(FileNameInfo = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, NeededSize))) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); return FALSE; } - FileNameInformation->FileNameLength = ShortName.Length; - RtlCopyMemory(FileNameInformation->FileName, ShortName.Buffer, ShortName.Length); + FileNameInfo->FileNameLength = ShortName.Length; + RtlCopyMemory(FileNameInfo->FileName, ShortName.Buffer, ShortName.Length); Status = NtSetInformationFile(hFile, &IoStatusBlock, //out - FileNameInformation, + FileNameInfo, NeededSize, FileShortNameInformation); - RtlFreeHeap(RtlGetProcessHeap(), 0, FileNameInformation); + RtlFreeHeap(RtlGetProcessHeap(), 0, FileNameInfo); if(!NT_SUCCESS(Status)) { - SetLastErrorByStatus(Status); + return FALSE; } - return NT_SUCCESS(Status); + return TRUE; }