minor clean-ups
This commit is contained in:
parent
d9ef1cae17
commit
ade04862f8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue