Skip to content

Commit

Permalink
Replace 0 with NULL for some MSVC-specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
zeux committed Oct 16, 2023
1 parent dab3a2f commit 6699559
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pugixml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6699559

Please sign in to comment.