diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c index c012fcbfe..b3f2b1c04 100644 --- a/gio/gunixconnection.c +++ b/gio/gunixconnection.c @@ -176,10 +176,11 @@ g_unix_connection_receive_fd (GUnixConnection *connection, { gint i; - 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)); + 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); for (i = 0; i < nscm; i++) g_object_unref (scms[i]); @@ -209,10 +210,11 @@ g_unix_connection_receive_fd (GUnixConnection *connection, { gint i; - 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)); + 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); for (i = 0; i < nfd; i++) close (fds[i]); @@ -590,12 +592,13 @@ g_unix_connection_receive_credentials (GUnixConnection *connection, { if (nscm != 1) { - 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)); + 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); goto out; }