aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-10-06 21:35:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-10-06 21:37:01 +0800
commit126aa2398abc1bbab0fd0cd76fda5042cc83fe76 (patch)
treea56dac4e77d7fad6901468564caa09644a1a806b /composer
parent938505da180727fbc56b68b80851adc3cf676523 (diff)
downloadgsoc2013-evolution-126aa2398abc1bbab0fd0cd76fda5042cc83fe76.tar.gz
gsoc2013-evolution-126aa2398abc1bbab0fd0cd76fda5042cc83fe76.tar.zst
gsoc2013-evolution-126aa2398abc1bbab0fd0cd76fda5042cc83fe76.zip
Prefer g_simple_async_result_take_error().
Slightly more efficient and convenient than: g_simple_async_result_set_from_error (simple, error); g_error_free (error); One less GError to copy and destroy.
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 82541d6aa7..82bca68514 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -966,15 +966,13 @@ composer_build_message_thread (GSimpleAsyncResult *simple,
}
if (!composer_build_message_pgp (context, cancellable, &error)) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
+ g_simple_async_result_take_error (simple, error);
return;
}
#if defined (HAVE_NSS)
if (!composer_build_message_smime (context, cancellable, &error)) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
+ g_simple_async_result_take_error (simple, error);
return;
}
#endif /* HAVE_NSS */
@@ -4594,8 +4592,7 @@ composer_get_message_ready (EMsgComposer *composer,
if (error != NULL) {
g_warn_if_fail (message == NULL);
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
+ g_simple_async_result_take_error (simple, error);
}
g_simple_async_result_complete (simple);