diff src/collect-io.c @ 403:2649a28d31b6

Introduce printf_term() macro and use it.
author zas_
date Fri, 18 Apr 2008 09:15:09 +0000
parents ce00494827e2
children 4b2d7f9af171
line wrap: on
line diff
--- a/src/collect-io.c	Thu Apr 17 20:14:49 2008 +0000
+++ b/src/collect-io.c	Fri Apr 18 09:15:09 2008 +0000
@@ -337,11 +337,7 @@
 	g_free(pathl);
 	if (!ssi)
 		{
-		gchar *buf;
-
-		buf = g_strdup_printf(_("failed to open collection (write) \"%s\"\n"), path);
-		print_term(buf);
-		g_free(buf);
+		printf_term(_("failed to open collection (write) \"%s\"\n"), path);
 		return FALSE;
 		}
 
@@ -366,12 +362,8 @@
 
 	if (secure_close(ssi))
 		{
-		gchar *buf;
-
-		buf = g_strdup_printf(_("error saving collection file: %s\nerror: %s\n"), path,
-				      secsave_strerror(secsave_errno));
-		print_term(buf);
-		g_free(buf);
+		printf_term(_("error saving collection file: %s\nerror: %s\n"), path,
+			    secsave_strerror(secsave_errno));
 		return FALSE;
 		}