aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/image-inline/image-inline.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-06 02:02:01 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:34 +0800
commitaf704b849e6a28582ca6d75b0ee0ef3a867587cf (patch)
treed8db9243ed23680f0b78ef5b87ecee4df68eb4b8 /plugins/image-inline/image-inline.c
parentc72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8 (diff)
downloadgsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar
gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.gz
gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.bz2
gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.lz
gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.xz
gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.zst
gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.zip
Avoid camel_stream_printf().
camel_stream_printf() is next on the chopping block. Use g_strdup_printf() or a GString to construct a formatted string in memory, pass it to camel_stream_write() in one go, and then check for errors (unless it's a memory stream).
Diffstat (limited to 'plugins/image-inline/image-inline.c')
-rw-r--r--plugins/image-inline/image-inline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/image-inline/image-inline.c b/plugins/image-inline/image-inline.c
index edb527c3a6..73a630a259 100644
--- a/plugins/image-inline/image-inline.c
+++ b/plugins/image-inline/image-inline.c
@@ -448,6 +448,7 @@ org_gnome_image_inline_format (gpointer ep, EMFormatHookTarget *target)
{
ImageInlinePObject *image_object;
gchar *classid;
+ gchar *content;
classid = g_strdup_printf (
"org-gnome-image-inline-display-%d",
@@ -466,8 +467,9 @@ org_gnome_image_inline_format (gpointer ep, EMFormatHookTarget *target)
image_object->object.free = org_gnome_image_inline_pobject_free;
org_gnome_image_inline_decode (image_object);
- camel_stream_printf (
- target->stream, "<object classid=%s></object>", classid);
+ content = g_strdup_printf ("<object classid=%s></object>", classid);
+ camel_stream_write_string (target->stream, content, NULL, NULL);
+ g_free (content);
g_free (classid);
}