summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan <mail@3v1n0.net>2023-04-21 12:05:14 +0000
committerMarco Trevisan <mail@3v1n0.net>2023-04-21 12:05:14 +0000
commit3594d9615b77669daf0f2d450ff3bcc2275ad499 (patch)
tree81cc45399b4099e31f01e3ef0ead369dcf1341b0
parentb8466bb54dbd1f633536cf9101ed8e369a3bdc08 (diff)
parent4ae8606b6f80f9764e1f0a82cea7e23c8af487ae (diff)
downloadglib-3594d9615b77669daf0f2d450ff3bcc2275ad499.tar.gz
Merge branch 'update-errfmt-in-gunixconnection' into 'main'
Fix error format in gio/gunixconnection.c (part 2) See merge request GNOME/glib!3390
-rw-r--r--gio/gunixconnection.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c
index b3f2b1c04..c012fcbfe 100644
--- a/gio/gunixconnection.c
+++ b/gio/gunixconnection.c
@@ -176,11 +176,10 @@ g_unix_connection_receive_fd (GUnixConnection *connection,
{
gint i;
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- ngettext("Expecting 1 control message, got %d",
- "Expecting 1 control message, got %d",
- nscm),
- nscm);
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ ngettext ("Expecting 1 control message, got %d",
+ "Expecting 1 control message, got %d",
+ nscm));
for (i = 0; i < nscm; i++)
g_object_unref (scms[i]);
@@ -210,11 +209,10 @@ g_unix_connection_receive_fd (GUnixConnection *connection,
{
gint i;
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- ngettext("Expecting one fd, but got %d\n",
- "Expecting one fd, but got %d\n",
- nfd),
- nfd);
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ ngettext ("Expecting one fd, but got %d\n",
+ "Expecting one fd, but got %d\n",
+ nfd));
for (i = 0; i < nfd; i++)
close (fds[i]);
@@ -592,13 +590,12 @@ g_unix_connection_receive_credentials (GUnixConnection *connection,
{
if (nscm != 1)
{
- g_set_error (error,
- G_IO_ERROR,
- G_IO_ERROR_FAILED,
- ngettext("Expecting 1 control message, got %d",
- "Expecting 1 control message, got %d",
- nscm),
- nscm);
+ g_set_error_literal (error,
+ G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ ngettext ("Expecting 1 control message, got %d",
+ "Expecting 1 control message, got %d",
+ nscm));
goto out;
}