[Commits] [SCM] claws branch, master, updated. 3.17.0-111-gdf5a9f6

Colin colin at claws-mail.org
Wed Oct 10 10:22:24 CEST 2018


The branch, master has been updated
       via  df5a9f61d1eaae68a77de60c8b9398925542e37b (commit)
      from  2edb13e5831d2e8b17274cf628a1ff1399da7bfd (commit)

Summary of changes:
 src/common/file-utils.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit df5a9f61d1eaae68a77de60c8b9398925542e37b
Author: Colin Leroy <colin at colino.net>
Date:   Wed Oct 10 10:22:09 2018 +0200

    str_open_as_stream() doesn't need a real file either.

diff --git a/src/common/file-utils.c b/src/common/file-utils.c
index e4d7a5e..392821e 100644
--- a/src/common/file-utils.c
+++ b/src/common/file-utils.c
@@ -872,7 +872,10 @@ FILE *str_open_as_stream(const gchar *str)
 
 	cm_return_val_if_fail(str != NULL, NULL);
 
-	fp = my_tmpfile();
+	len = strlen(str);
+
+	fp = my_tmpfile_with_len(len);
+
 	if (!fp) {
 		FILE_OP_ERROR("str_open_as_stream", "my_tmpfile");
 		return NULL;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list