0
0
mirror of https://github.com/zeux/pugixml.git synced 2025-01-13 17:37:58 +08:00

Replace 0 with NULL for some MSVC-specific code

This commit is contained in:
Arseny Kapoulkine 2023-10-15 19:17:37 -07:00
parent dab3a2f858
commit 6699559320

View File

@ -5048,8 +5048,8 @@ PUGI_IMPL_NS_BEGIN
PUGI_IMPL_FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
{
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
FILE* file = 0;
return _wfopen_s(&file, path, mode) == 0 ? file : 0;
FILE* file = NULL;
return _wfopen_s(&file, path, mode) == 0 ? file : NULL;
#else
return _wfopen(path, mode);
#endif
@ -5099,8 +5099,8 @@ PUGI_IMPL_NS_BEGIN
PUGI_IMPL_FN FILE* open_file(const char* path, const char* mode)
{
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
FILE* file = 0;
return fopen_s(&file, path, mode) == 0 ? file : 0;
FILE* file = NULL;
return fopen_s(&file, path, mode) == 0 ? file : NULL;
#else
return fopen(path, mode);
#endif