From 4457d06139b9f89bf111b83277efa773671508a9 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 19 Feb 2025 23:39:58 +0000 Subject: [PATCH] Apply 4 suggestion(s) to 2 file(s) --- gio/gdbusconnection.h | 15 ++++++++------- gio/tests/gdbus-connection.c | 6 +++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/gio/gdbusconnection.h b/gio/gdbusconnection.h index 40f5f657f..d91a063b7 100644 --- a/gio/gdbusconnection.h +++ b/gio/gdbusconnection.h @@ -606,20 +606,21 @@ void g_dbus_connection_signal_unsubscribe (GDBusConnection /** * g_clear_dbus_signal_subscription: (skip) * @subscription_id_pointer: (not optional) (inout): A pointer to either a - * subscription id obtained from g_dbus_connection_signal_subscribe(), - * or zero. + * subscription ID obtained from [method@Gio.DBusConnection.signal_subscribe], + * or zero. * @connection: The connection from which the subscription ID was obtained. - * This pointer may be %NULL or invalid, if the subscription ID is zero. + * This pointer may be `NULL` or invalid, if the subscription ID is zero. * * If @subscription_id_pointer points to a nonzero subscription ID, * unsubscribe from that D-Bus signal subscription as if via - * g_dbus_connection_signal_unsubscribe(). + * [method@Gio.DBusConnection.signal_unsubscribe]. + * * Also set the value pointed to by @subscription_id_pointer to zero, - * which is not a valid subscription ID. + * which signifies it’s no longer a valid subscription ID. * * This convenience function for C code helps to ensure that each signal - * subscription is unsubscribed exactly once, similar to g_clear_object() - * and g_clear_signal_handler(). + * subscription is unsubscribed exactly once, similar to + * [func@GObject.g_clear_object] and [func@GObject.clear_signal_handler]. * * Since: 2.84 */ diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c index 9b8178d4d..7e2f176ac 100644 --- a/gio/tests/gdbus-connection.c +++ b/gio/tests/gdbus-connection.c @@ -793,12 +793,12 @@ test_connection_signals (void) g_assert_cmpint (count_s4, ==, 2); g_assert_cmpint (count_s5, ==, 1); - g_assert_cmpint (s1, !=, 0); + g_assert_cmpuint (s1, !=, 0); g_clear_dbus_signal_subscription (&s1, c1); - g_assert_cmpint (s1, ==, 0); + g_assert_cmpuint (s1, ==, 0); /* g_clear_dbus_signal_subscription() is idempotent, with no warnings */ g_clear_dbus_signal_subscription (&s1, c1); - g_assert_cmpint (s1, ==, 0); + g_assert_cmpuint (s1, ==, 0); g_clear_dbus_signal_subscription (&s2, c1); g_clear_dbus_signal_subscription (&s3, c1);