mirror of
https://github.com/reactos/reactos.git
synced 2025-05-20 17:45:06 +00:00
[UCRT] Fix multiple missing dereferences
This is a bug in MS UCRT code. MSVC allows to check a pointer to be > 0, GCC emits a warning.
This commit is contained in:
parent
d622c4a7a0
commit
2d753d95fb
3 changed files with 3 additions and 3 deletions
|
@ -251,7 +251,7 @@ error_cleanup:
|
||||||
if ( (ploci->ctype1_refcount != nullptr)&&
|
if ( (ploci->ctype1_refcount != nullptr)&&
|
||||||
(InterlockedDecrement(ploci->ctype1_refcount) == 0))
|
(InterlockedDecrement(ploci->ctype1_refcount) == 0))
|
||||||
{
|
{
|
||||||
_ASSERTE(ploci->ctype1_refcount > 0);
|
_ASSERTE(*ploci->ctype1_refcount > 0);
|
||||||
}
|
}
|
||||||
ploci->ctype1_refcount = nullptr;
|
ploci->ctype1_refcount = nullptr;
|
||||||
ploci->ctype1 = nullptr;
|
ploci->ctype1 = nullptr;
|
||||||
|
|
|
@ -205,7 +205,7 @@ int __cdecl __acrt_locale_initialize_monetary (
|
||||||
if ( (ploci->lconv_mon_refcount != nullptr) &&
|
if ( (ploci->lconv_mon_refcount != nullptr) &&
|
||||||
(InterlockedDecrement(ploci->lconv_mon_refcount) == 0))
|
(InterlockedDecrement(ploci->lconv_mon_refcount) == 0))
|
||||||
{
|
{
|
||||||
_ASSERTE(ploci->lconv_mon_refcount > 0);
|
_ASSERTE(*ploci->lconv_mon_refcount > 0);
|
||||||
}
|
}
|
||||||
if ( (ploci->lconv_intl_refcount != nullptr) &&
|
if ( (ploci->lconv_intl_refcount != nullptr) &&
|
||||||
(InterlockedDecrement(ploci->lconv_intl_refcount) == 0))
|
(InterlockedDecrement(ploci->lconv_intl_refcount) == 0))
|
||||||
|
|
|
@ -187,7 +187,7 @@ int __cdecl __acrt_locale_initialize_numeric (
|
||||||
if ( (ploci->lconv_num_refcount != nullptr) &&
|
if ( (ploci->lconv_num_refcount != nullptr) &&
|
||||||
(InterlockedDecrement(ploci->lconv_num_refcount) == 0))
|
(InterlockedDecrement(ploci->lconv_num_refcount) == 0))
|
||||||
{
|
{
|
||||||
_ASSERTE(ploci->lconv_num_refcount > 0);
|
_ASSERTE(*ploci->lconv_num_refcount > 0);
|
||||||
}
|
}
|
||||||
if ( (ploci->lconv_intl_refcount != nullptr) &&
|
if ( (ploci->lconv_intl_refcount != nullptr) &&
|
||||||
(InterlockedDecrement(ploci->lconv_intl_refcount) == 0))
|
(InterlockedDecrement(ploci->lconv_intl_refcount) == 0))
|
||||||
|
|
Loading…
Reference in a new issue