[glib/wip/steal-fd] Apply 3 suggestion(s) to 2 file(s)
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/steal-fd] Apply 3 suggestion(s) to 2 file(s)
- Date: Mon, 22 Mar 2021 11:30:39 +0000 (UTC)
commit 51f42bce24a17681e54536f671cd753a5892460c
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Mar 22 11:30:37 2021 +0000
Apply 3 suggestion(s) to 2 file(s)
glib/gmain.c | 3 ++-
glib/tests/mainloop.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 1bccd0f5a..2e1ab3a25 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -6135,7 +6135,8 @@ g_get_worker_context (void)
* but for file descriptors.
*
* On POSIX platforms, this function is async-signal safe
- * (see signal(7) and signal-safety(7)), making it safe to call from a
+ * (see [`signal(7)`](man:signal(7)) and
+ * [`signal-safety(7)`](man:signal-safety(7))), making it safe to call from a
* signal handler or a #GSpawnChildSetupFunc.
*
* Returns: the value that @fd_ptr previously had
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
index d4531a731..e0ff04628 100644
--- a/glib/tests/mainloop.c
+++ b/glib/tests/mainloop.c
@@ -2083,6 +2083,7 @@ test_steal_fd (void)
fd = g_file_open_tmp (NULL, &tmpfile, &error);
g_assert_cmpint (fd, >=, 0);
+ g_assert_no_error (error);
borrowed = fd;
stolen = g_steal_fd (&fd);
g_assert_cmpint (fd, ==, -1);
@@ -2090,6 +2091,7 @@ test_steal_fd (void)
g_close (g_steal_fd (&stolen), &error);
g_assert_no_error (error);
+ g_assert_cmpint (stolen, ==, -1);
g_assert_no_errno (remove (tmpfile));
g_free (tmpfile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]