From 005a26de4534cfaf534e8e4828366b619a3b21d1 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 5 Jul 2011 14:02:01 -0400 Subject: 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). --- plugins/image-inline/image-inline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/image-inline') 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, "", classid); + content = g_strdup_printf ("", classid); + camel_stream_write_string (target->stream, content, NULL, NULL); + g_free (content); g_free (classid); } -- cgit