changed to use g_set_error().

2008-08-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/file-psd/psd-util.c (psd_set_error): changed to use
	g_set_error().


svn path=/trunk/; revision=26618
This commit is contained in:
Sven Neumann
2008-08-17 11:14:13 +00:00
committed by Sven Neumann
parent 1277bb4415
commit 3fa2cbe022
2 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,7 @@
2008-08-17 Sven Neumann <sven@gimp.org>
* 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 <sven@gimp.org>

View File

@ -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;