[gimp] app: use xcf_write_int32_check_error() for all XCF property writing
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use xcf_write_int32_check_error() for all XCF property writing
- Date: Wed, 15 Oct 2014 21:37:21 +0000 (UTC)
commit 7b6c66159ac155323f47c5144f081bba47656c44
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 15 23:36:06 2014 +0200
app: use xcf_write_int32_check_error() for all XCF property writing
Some (copy/paste I guess) places used xcf_write_int32() plus manual
error checking for no reason.
app/xcf/xcf-save.c | 22 ++++------------------
1 files changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index b52d6ce..b6b7afb 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -956,14 +956,10 @@ xcf_save_prop (XcfInfo *info,
xcf_check_error (xcf_save_parasite_list (info, list, error));
length = info->cp - base;
+
/* go back to the saved position and write the length */
xcf_check_error (xcf_seek_pos (info, pos, error));
- xcf_write_int32 (info->output, &length, 1, &tmp_error);
- if (tmp_error)
- {
- g_propagate_error (error, tmp_error);
- return FALSE;
- }
+ xcf_write_int32_check_error (info, &length, 1);
xcf_check_error (xcf_seek_pos (info, base + length, error));
}
@@ -1005,12 +1001,7 @@ xcf_save_prop (XcfInfo *info,
/* go back to the saved position and write the length */
xcf_check_error (xcf_seek_pos (info, pos, error));
- xcf_write_int32 (info->output, &length, 1, &tmp_error);
- if (tmp_error)
- {
- g_propagate_error (error, tmp_error);
- return FALSE;
- }
+ xcf_write_int32_check_error (info, &length, 1);
xcf_check_error (xcf_seek_pos (info, base + length, error));
}
@@ -1071,12 +1062,7 @@ xcf_save_prop (XcfInfo *info,
/* go back to the saved position and write the length */
xcf_check_error (xcf_seek_pos (info, pos, error));
- xcf_write_int32 (info->output, &length, 1, &tmp_error);
- if (tmp_error)
- {
- g_propagate_error (error, tmp_error);
- return FALSE;
- }
+ xcf_write_int32_check_error (info, &length, 1);
xcf_check_error (xcf_seek_pos (info, base + length, error));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]