From 9c17697b56501d11b4c653432cc9e290347aa03e Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 16 Jun 2008 16:53:58 +0000 Subject: Use g_set_error_literal where appropriate. Patch from bug #535947. svn path=/trunk/; revision=7051 --- gio/goutputstream.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'gio/goutputstream.c') diff --git a/gio/goutputstream.c b/gio/goutputstream.c index 051c0e843..b68593a4f 100644 --- a/gio/goutputstream.c +++ b/gio/goutputstream.c @@ -196,8 +196,8 @@ g_output_stream_write (GOutputStream *stream, if (class->write_fn == NULL) { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, - _("Output stream doesn't implement write")); + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + _("Output stream doesn't implement write")); return -1; } @@ -357,8 +357,8 @@ g_output_stream_splice (GOutputStream *stream, if (g_input_stream_is_closed (source)) { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED, - _("Source stream is already closed")); + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED, + _("Source stream is already closed")); return -1; } @@ -397,8 +397,8 @@ g_output_stream_real_splice (GOutputStream *stream, bytes_copied = 0; if (class->write_fn == NULL) { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, - _("Output stream doesn't implement write")); + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + _("Output stream doesn't implement write")); res = FALSE; goto notsupported; } @@ -1070,18 +1070,18 @@ g_output_stream_set_pending (GOutputStream *stream, if (stream->priv->closed) { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED, - _("Stream is already closed")); + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED, + _("Stream is already closed")); return FALSE; } if (stream->priv->pending) { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_PENDING, - /* Translators: This is an error you get if there is - * already an operation running against this stream when - * you try to start one */ - _("Stream has outstanding operation")); + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PENDING, + /* Translators: This is an error you get if there is + * already an operation running against this stream when + * you try to start one */ + _("Stream has outstanding operation")); return FALSE; } -- cgit v1.2.1