From 3c1d78518841919eff224c2b238dcff7e953b211 Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Thu, 27 Oct 2011 09:38:14 +0000 Subject: [PATCH] [KERNEL32] Use ERROR_SUCCESS instead of 0. Dedicated to Pierre. svn path=/trunk/; revision=54258 --- reactos/dll/win32/kernel32/client/file/create.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/dll/win32/kernel32/client/file/create.c b/reactos/dll/win32/kernel32/client/file/create.c index 74115b1d761..282d9918654 100644 --- a/reactos/dll/win32/kernel32/client/file/create.c +++ b/reactos/dll/win32/kernel32/client/file/create.c @@ -361,15 +361,15 @@ HANDLE WINAPI CreateFileW (LPCWSTR lpFileName, */ if (dwCreationDisposition == FILE_OPEN_IF) { - SetLastError(IoStatusBlock.Information == FILE_OPENED ? ERROR_ALREADY_EXISTS : 0); + SetLastError(IoStatusBlock.Information == FILE_OPENED ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS); } else if (dwCreationDisposition == FILE_OVERWRITE_IF) { - SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : 0); + SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS); } else { - SetLastError(0); + SetLastError(ERROR_SUCCESS); } return FileHandle;