aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
Diffstat (limited to 'em-format')
-rw-r--r--em-format/e-mail-formatter-attachment.c6
-rw-r--r--em-format/e-mail-parser.c18
2 files changed, 13 insertions, 11 deletions
diff --git a/em-format/e-mail-formatter-attachment.c b/em-format/e-mail-formatter-attachment.c
index 0a100e0987..1003b55eef 100644
--- a/em-format/e-mail-formatter-attachment.c
+++ b/em-format/e-mail-formatter-attachment.c
@@ -209,7 +209,7 @@ emfe_attachment_format (EMailFormatterExtension *extension,
display_name = g_file_info_get_display_name (fi);
description = e_attachment_get_description (attachment);
- if (description && *description) {
+ if (description != NULL && *description != '\0') {
name = g_strdup_printf (
"<h2>Attachment: %s (%s)</h2>\n",
description, display_name);
@@ -219,7 +219,9 @@ emfe_attachment_format (EMailFormatterExtension *extension,
display_name);
}
- camel_stream_write_string (stream, name, cancellable, NULL);
+ camel_stream_write_string (
+ stream, name, cancellable, NULL);
+
g_free (name);
g_object_unref (attachment);
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index 929662f943..f31e0ca199 100644
--- a/em-format/e-mail-parser.c
+++ b/em-format/e-mail-parser.c
@@ -732,22 +732,22 @@ e_mail_parser_wrap_as_attachment (EMailParser *parser,
NULL);
if (size != 0) {
- GFileInfo *fileinfo;
+ GFileInfo *file_info;
- fileinfo = e_attachment_get_file_info (attachment);
+ file_info = e_attachment_get_file_info (attachment);
- if (!fileinfo) {
- fileinfo = g_file_info_new ();
+ if (file_info == NULL) {
+ file_info = g_file_info_new ();
g_file_info_set_content_type (
- fileinfo, empa->snoop_mime_type);
+ file_info, empa->snoop_mime_type);
} else {
- g_object_ref (fileinfo);
+ g_object_ref (file_info);
}
- g_file_info_set_size (fileinfo, size);
- e_attachment_set_file_info (attachment, fileinfo);
+ g_file_info_set_size (file_info, size);
+ e_attachment_set_file_info (attachment, file_info);
- g_object_unref (fileinfo);
+ g_object_unref (file_info);
}
g_object_unref (attachment);