Fixed warnings.

svn path=/trunk/; revision=3827
This commit is contained in:
Eric Kohl 2002-12-06 17:33:16 +00:00
parent 5c0db541d3
commit 72136233fb

View file

@ -1,4 +1,4 @@
/* $Id: volume.c,v 1.26 2002/09/08 10:22:42 chorns Exp $ /* $Id: volume.c,v 1.27 2002/12/06 17:33:16 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -30,7 +30,10 @@
#define MAX_DOS_DRIVES 26 #define MAX_DOS_DRIVES 26
HANDLE InternalOpenDirW(PWCHAR DirName, BOOLEAN Write)
static HANDLE
InternalOpenDirW(LPCWSTR DirName,
BOOLEAN Write)
{ {
UNICODE_STRING NtPathU; UNICODE_STRING NtPathU;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
@ -38,7 +41,7 @@ HANDLE InternalOpenDirW(PWCHAR DirName, BOOLEAN Write)
IO_STATUS_BLOCK IoStatusBlock; IO_STATUS_BLOCK IoStatusBlock;
HANDLE hFile; HANDLE hFile;
if (!RtlDosPathNameToNtPathName_U ((LPWSTR)DirName, if (!RtlDosPathNameToNtPathName_U((LPWSTR)DirName,
&NtPathU, &NtPathU,
NULL, NULL,
NULL)) NULL))
@ -76,6 +79,7 @@ HANDLE InternalOpenDirW(PWCHAR DirName, BOOLEAN Write)
return hFile; return hFile;
} }
DWORD STDCALL DWORD STDCALL
GetLogicalDriveStringsA(DWORD nBufferLength, GetLogicalDriveStringsA(DWORD nBufferLength,
LPSTR lpBuffer) LPSTR lpBuffer)
@ -223,12 +227,12 @@ GetDiskFreeSpaceW(
RootPathName[3] = 0; RootPathName[3] = 0;
} }
if (INVALID_HANDLE_VALUE == (hFile = InternalOpenDirW((PWCHAR)lpRootPathName, FALSE))) hFile = InternalOpenDirW(lpRootPathName, FALSE);
if (INVALID_HANDLE_VALUE == hFile)
{ {
return FALSE; return FALSE;
} }
errCode = NtQueryVolumeInformationFile(hFile, errCode = NtQueryVolumeInformationFile(hFile,
&IoStatusBlock, &IoStatusBlock,
&FileFsSize, &FileFsSize,
@ -322,7 +326,8 @@ GetDiskFreeSpaceExW(
RootPathName[3] = 0; RootPathName[3] = 0;
} }
if (INVALID_HANDLE_VALUE == (hFile = InternalOpenDirW(lpDirectoryName, FALSE))) hFile = InternalOpenDirW(lpDirectoryName, FALSE);
if (INVALID_HANDLE_VALUE == hFile)
{ {
return FALSE; return FALSE;
} }
@ -678,7 +683,8 @@ SetVolumeLabelW(LPCWSTR lpRootPathName,
wcscpy(LabelInfo->VolumeLabel, wcscpy(LabelInfo->VolumeLabel,
lpVolumeName); lpVolumeName);
if (INVALID_HANDLE_VALUE == (hFile = InternalOpenDirW(lpRootPathName, TRUE))) hFile = InternalOpenDirW(lpRootPathName, TRUE);
if (INVALID_HANDLE_VALUE == hFile)
{ {
return FALSE; return FALSE;
} }