minor clean-ups

This commit is contained in:
unknown 2015-11-11 12:43:57 -05:00
parent d9ef1cae17
commit ade04862f8
1 changed files with 4 additions and 6 deletions

View File

@ -79,14 +79,12 @@ bool CFile::Open(const char * lpszFileName, uint32_t nOpenFlags)
sa.bInheritHandle = (nOpenFlags & modeNoInherit) == 0;
// map creation flags
ULONG dwCreateFlag = 0;
ULONG dwCreateFlag = OPEN_EXISTING;
if (nOpenFlags & modeCreate)
{
dwCreateFlag = (nOpenFlags & modeNoTruncate) != 0 ? OPEN_ALWAYS : CREATE_ALWAYS;
}
else
{
dwCreateFlag = OPEN_EXISTING;
dwCreateFlag =
((nOpenFlags & modeNoTruncate) != 0)
? OPEN_ALWAYS : CREATE_ALWAYS;
}
// attempt file creation