[glib/cherry-pick-95ebaa26] Merge branch '1401-g_clear_handle_id-clear_func-not-nullable' into 'master'
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/cherry-pick-95ebaa26] Merge branch '1401-g_clear_handle_id-clear_func-not-nullable' into 'master'
- Date: Mon, 4 Jun 2018 13:44:26 +0000 (UTC)
commit cfa28e152bef6614add71efea9a260036ee83652
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Jun 4 13:41:10 2018 +0000
Merge branch '1401-g_clear_handle_id-clear_func-not-nullable' into 'master'
g_clear_handle_id: don't accept NULL clear_func
Closes #1401
See merge request GNOME/glib!55
(cherry picked from commit 95ebaa26aa5b2a5f6e5ee554a6d185d296f6dc08)
0f7c196c g_clear_handle_id: don't accept NULL clear_func
glib/gmain.c | 3 +--
glib/gmain.h | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 227168a0f..26e68823d 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2437,8 +2437,7 @@ g_clear_handle_id (guint *tag_ptr,
if (_handle_id > 0)
{
*tag_ptr = 0;
- if (clear_func != NULL)
- clear_func (_handle_id);
+ clear_func (_handle_id);
}
}
diff --git a/glib/gmain.h b/glib/gmain.h
index 76e2c14c1..2515d7326 100644
--- a/glib/gmain.h
+++ b/glib/gmain.h
@@ -590,8 +590,7 @@ void g_clear_handle_id (guint *tag_ptr,
if (_handle_id > 0) \
{ \
*_tag_ptr = 0; \
- if (clear_func != NULL) \
- clear_func (_handle_id); \
+ clear_func (_handle_id); \
} \
} G_STMT_END
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]