From 7fafb9f2684aa9e6282e57f294ff38cbab84e03c Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 23 Jun 2023 22:28:34 +0200 Subject: [PATCH] cleanup: Prefix & rename create_socketpair --- lib/mks-paintable.c | 2 +- lib/mks-util-private.h | 2 +- lib/mks-util.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/mks-paintable.c b/lib/mks-paintable.c index 95de7e3..0ac25b2 100644 --- a/lib/mks-paintable.c +++ b/lib/mks-paintable.c @@ -725,7 +725,7 @@ _mks_paintable_new (GCancellable *cancellable, /* Create a socketpair() to use for D-Bus P2P protocol. We will be receiving * DMA-BUF FDs over this. */ - if (!create_socketpair (&us, &them, error)) + if (!mks_socketpair_create (&us, &them, error)) return NULL; /* Create socket for our side of the socket pair */ diff --git a/lib/mks-util-private.h b/lib/mks-util-private.h index ad36f1b..20df145 100644 --- a/lib/mks-util-private.h +++ b/lib/mks-util-private.h @@ -44,7 +44,7 @@ G_BEGIN_DECLS #endif -gboolean create_socketpair (int *us, +gboolean mks_socketpair_create (int *us, int *them, GError **error); gboolean mks_scroll_event_is_inverted (GdkEvent *event); diff --git a/lib/mks-util.c b/lib/mks-util.c index 1a7495c..fea4fa8 100644 --- a/lib/mks-util.c +++ b/lib/mks-util.c @@ -92,9 +92,9 @@ mks_scroll_event_is_inverted (GdkEvent *event) } gboolean -create_socketpair (int *us, - int *them, - GError **error) +mks_socketpair_create (int *us, + int *them, + GError **error) { int fds[2]; int rv; @@ -165,7 +165,7 @@ mks_socketpair_connection_new (GDBusConnectionFlags flags, g_task_set_source_tag (task, mks_socketpair_connection_new); g_task_set_task_data (task, GINT_TO_POINTER (-1), NULL); - if (!create_socketpair (&us, &them, &error) || + if (!mks_socketpair_create (&us, &them, &error) || !(socket = g_socket_new_from_fd (us, &error))) { g_task_return_error (task, g_steal_pointer (&error));