diff --git a/ChangeLog b/ChangeLog index 57f01f68c6..17fc89779f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2008-08-17 Sven Neumann * plug-ins/file-psd/psd-util.c (psd_set_error): changed to use - g_error_new_literal(). + g_set_error(). 2008-08-17 Sven Neumann diff --git a/plug-ins/file-psd/psd-util.c b/plug-ins/file-psd/psd-util.c index 56ab837a0e..727137b29f 100644 --- a/plug-ins/file-psd/psd-util.c +++ b/plug-ins/file-psd/psd-util.c @@ -45,19 +45,15 @@ psd_set_error (const gboolean file_eof, const gint err_no, GError **error) { - /* - * Set error - */ if (file_eof) { - *error = g_error_new (G_FILE_ERROR, G_FILE_ERROR_FAILED, - _("Unexpected end of file")); + g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, + "%s", _("Unexpected end of file")); } else { - *error = g_error_new_literal (G_FILE_ERROR, - g_file_error_from_errno (err_no), - g_strerror (err_no)); + g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (err_no), + "%s", g_strerror (err_no)); } return;