Index: base/platform_file_posix.cc |
diff --git a/base/platform_file_posix.cc b/base/platform_file_posix.cc |
index 26c52d4682fe3e9451f4f4a24b08ce45f226752d..02c2f2f54854098bf0efdacb02374e419310f2f7 100644 |
--- a/base/platform_file_posix.cc |
+++ b/base/platform_file_posix.cc |
@@ -55,7 +55,8 @@ PlatformFile CreatePlatformFile(const FilePath& name, int flags, |
!(flags & PLATFORM_FILE_OPEN_ALWAYS)) { |
NOTREACHED(); |
errno = EOPNOTSUPP; |
- *error_code = error_code ? PLATFORM_FILE_ERROR_FAILED : PLATFORM_FILE_OK; |
+ if (error_code) |
+ *error_code = PLATFORM_FILE_ERROR_FAILED; |
return kInvalidPlatformFileValue; |
} |