diff options
author | Kleis Auke Wolthuizen <github@kleisauke.nl> | 2023-04-06 15:19:35 +0200 |
---|---|---|
committer | Kleis Auke Wolthuizen <github@kleisauke.nl> | 2023-04-06 15:19:35 +0200 |
commit | 86ef92d548f11d01e532729748581d8fcfbad1d9 (patch) | |
tree | bc020b6b6f3092f313b923ea8ec1c95176b64985 /glib | |
parent | 9ec6695a72a651c90b4ac61cacd352836d5efb96 (diff) | |
download | glib-86ef92d548f11d01e532729748581d8fcfbad1d9.tar.gz |
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.
Diffstat (limited to 'glib')
-rw-r--r-- | glib/gwin32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/glib/gwin32.c b/glib/gwin32.c index d1391b1d2..85053c079 100644 --- a/glib/gwin32.c +++ b/glib/gwin32.c @@ -578,7 +578,9 @@ g_win32_check_windows_version (const gint major, /* Check for Service Pack Version >= 0 */ 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 */ if (osverinfo.dwMajorVersion > (DWORD) major) |