mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[KERNEL32]
- Do not use a "magic number" for the return value 0xFFFFFFFF from GetFileAttributes. - Use a meaningful variable name for retrieving the result of GetFileAttributes. svn path=/trunk/; revision=71879
This commit is contained in:
parent
121e0791d7
commit
7795699eaa
2 changed files with 8 additions and 8 deletions
|
@ -435,7 +435,7 @@ OpenFile(LPCSTR lpFileName,
|
|||
|
||||
switch (dwAttributes)
|
||||
{
|
||||
case 0xFFFFFFFF: /* File does not exist */
|
||||
case INVALID_FILE_ATTRIBUTES: /* File does not exist */
|
||||
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||
lpReOpenBuff->nErrCode = (WORD) ERROR_FILE_NOT_FOUND;
|
||||
return -1;
|
||||
|
|
|
@ -2329,7 +2329,7 @@ CreateProcessInternalW(IN HANDLE hUserToken,
|
|||
PCHAR pcScan;
|
||||
SIZE_T n;
|
||||
WCHAR SaveChar;
|
||||
ULONG Length, CurdirLength, CmdQuoteLength;
|
||||
ULONG Length, FileAttribs, CmdQuoteLength;
|
||||
ULONG CmdLineLength, ResultSize;
|
||||
PWCHAR QuotedCmdLine, AnsiCmdCommand, ExtBuffer, CurrentDirectory;
|
||||
PWCHAR NullBuffer, ScanString, NameBuffer, SearchPath, DebuggerCmdLine;
|
||||
|
@ -2734,9 +2734,9 @@ StartScan:
|
|||
if ((Length) && (Length < MAX_PATH))
|
||||
{
|
||||
/* Get file attributes */
|
||||
CurdirLength = GetFileAttributesW(NameBuffer);
|
||||
if ((CurdirLength != 0xFFFFFFFF) &&
|
||||
(CurdirLength & FILE_ATTRIBUTE_DIRECTORY))
|
||||
FileAttribs = GetFileAttributesW(NameBuffer);
|
||||
if ((FileAttribs != INVALID_FILE_ATTRIBUTES) &&
|
||||
(FileAttribs & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
/* This was a directory, fail later on */
|
||||
Length = 0;
|
||||
|
@ -4066,9 +4066,9 @@ StartScan:
|
|||
}
|
||||
|
||||
/* Make sure the directory is actually valid */
|
||||
CurdirLength = GetFileAttributesW(CurrentDirectory);
|
||||
if ((CurdirLength == 0xffffffff) ||
|
||||
!(CurdirLength & FILE_ATTRIBUTE_DIRECTORY))
|
||||
FileAttribs = GetFileAttributesW(CurrentDirectory);
|
||||
if ((FileAttribs == INVALID_FILE_ATTRIBUTES) ||
|
||||
!(FileAttribs & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
/* It isn't, so bail out */
|
||||
DPRINT1("Current directory is invalid\n");
|
||||
|
|
Loading…
Reference in a new issue