From 49d0927079bd324c269ca8b61f1710ae82016512 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 14 May 2014 17:14:46 +0000 Subject: [PATCH] [CRT] * Update fopen_s(). CORE-8080 svn path=/trunk/; revision=63295 --- reactos/lib/sdk/crt/stdio/file.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/reactos/lib/sdk/crt/stdio/file.c b/reactos/lib/sdk/crt/stdio/file.c index ae6164e94f0..7b6e6ed101d 100644 --- a/reactos/lib/sdk/crt/stdio/file.c +++ b/reactos/lib/sdk/crt/stdio/file.c @@ -3180,11 +3180,9 @@ FILE * CDECL fopen(const char *path, const char *mode) int CDECL fopen_s(FILE** pFile, const char *filename, const char *mode) { - if (!MSVCRT_CHECK_PMT(pFile != NULL) || !MSVCRT_CHECK_PMT(filename != NULL) || - !MSVCRT_CHECK_PMT(mode != NULL)) { - *_errno() = EINVAL; - return EINVAL; - } + if (!MSVCRT_CHECK_PMT(pFile != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(filename != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(mode != NULL)) return EINVAL; *pFile = fopen(filename, mode);