diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-06-19 12:47:48 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-06-19 12:47:48 +0000 |
commit | 446f41757b425441976e5a2b32c233f64036e6ff (patch) | |
tree | e5c7f9043eee1d0378dee141d90ceab4db21db0f /gdk-pixbuf/io-tiff.c | |
parent | 1a30e12586de407b88b003b2f2599a599a9527f5 (diff) | |
download | gtk+-446f41757b425441976e5a2b32c233f64036e6ff.tar.gz |
Use g_set_error_literal where appropriate. Bug #538640.
svn path=/trunk/; revision=20463
Diffstat (limited to 'gdk-pixbuf/io-tiff.c')
-rw-r--r-- | gdk-pixbuf/io-tiff.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c index 84ddd0266f..e5c8b2f8a1 100644 --- a/gdk-pixbuf/io-tiff.c +++ b/gdk-pixbuf/io-tiff.c @@ -7,7 +7,7 @@ * Authors: Mark Crichton <crichton@gimp.org> * Federico Mena-Quintero <federico@gimp.org> * Jonathan Blandford <jrb@redhat.com> - * Søren Sandmann <sandmann@daimi.au.dk> + * S�ren Sandmann <sandmann@daimi.au.dk> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -128,9 +128,9 @@ tiff_set_error (GError **error, global_error = NULL; } else { - g_set_error (error, - GDK_PIXBUF_ERROR, - error_code, msg); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + error_code, msg); } } @@ -169,28 +169,28 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error) } if (width <= 0 || height <= 0) { - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_CORRUPT_IMAGE, - _("Width or height of TIFF image is zero")); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + _("Width or height of TIFF image is zero")); return NULL; } rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_CORRUPT_IMAGE, - _("Dimensions of TIFF image too large")); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + _("Dimensions of TIFF image too large")); return NULL; } bytes = height * rowstride; if (bytes / rowstride != height) { /* overflow */ - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_CORRUPT_IMAGE, - _("Dimensions of TIFF image too large")); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + _("Dimensions of TIFF image too large")); return NULL; } @@ -211,10 +211,10 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error) pixels = g_try_malloc (bytes); if (!pixels) { - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, - _("Insufficient memory to open TIFF file")); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, + _("Insufficient memory to open TIFF file")); return NULL; } @@ -223,10 +223,10 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error) free_buffer, NULL); if (!pixbuf) { g_free (pixels); - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, - _("Insufficient memory to open TIFF file")); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, + _("Insufficient memory to open TIFF file")); return NULL; } @@ -535,10 +535,10 @@ gdk_pixbuf__tiff_image_load_increment (gpointer data, const guchar *buf, g_return_val_if_fail (data != NULL, FALSE); if (!make_available_at_least (context, size)) { - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, - _("Insufficient memory to open TIFF file")); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, + _("Insufficient memory to open TIFF file")); return FALSE; } @@ -754,10 +754,10 @@ save_to_file_cb (const gchar *buf, } if (count) { - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_FAILED, - _("Couldn't write to TIFF file")); + g_set_error_literal (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_FAILED, + _("Couldn't write to TIFF file")); return FALSE; } |