mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gwin32: Avoid use of function call with side effect in g_return_* macro
This ensures that _g_win32_call_rtl_version is always called, regardless of whether G_DISABLE_CHECKS is defined or not.
This commit is contained in:
parent
9ec6695a72
commit
86ef92d548
@ -578,7 +578,9 @@ g_win32_check_windows_version (const gint major,
|
|||||||
|
|
||||||
/* Check for Service Pack Version >= 0 */
|
/* Check for Service Pack Version >= 0 */
|
||||||
g_return_val_if_fail (spver >= 0, FALSE);
|
g_return_val_if_fail (spver >= 0, FALSE);
|
||||||
g_return_val_if_fail (_g_win32_call_rtl_version (&osverinfo), FALSE);
|
|
||||||
|
if (!_g_win32_call_rtl_version (&osverinfo))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* check the OS and Service Pack Versions */
|
/* check the OS and Service Pack Versions */
|
||||||
if (osverinfo.dwMajorVersion > (DWORD) major)
|
if (osverinfo.dwMajorVersion > (DWORD) major)
|
||||||
|
Loading…
Reference in New Issue
Block a user