[Commits] [SCM] claws branch, master, updated. 3.17.2-8-g0671d72

ticho at claws-mail.org ticho at claws-mail.org
Mon Dec 17 20:20:33 CET 2018


The branch, master has been updated
       via  0671d7234e7e0ce5a35fa7ae29d235fe21e103bb (commit)
      from  6f9b6e1626343e64e5ef038bb4236aad0cdd9373 (commit)

Summary of changes:
 src/common/ssl_certificate.c |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)


- Log -----------------------------------------------------------------
commit 0671d7234e7e0ce5a35fa7ae29d235fe21e103bb
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Dec 17 20:20:24 2018 +0100

    Remove code duplication in get_certificate_path().

diff --git a/src/common/ssl_certificate.c b/src/common/ssl_certificate.c
index 7d5d50a..7c8a244 100644
--- a/src/common/ssl_certificate.c
+++ b/src/common/ssl_certificate.c
@@ -59,19 +59,15 @@ static gchar *get_certificate_path(const gchar *host, const gchar *port, const g
 
 	if (fp != NULL && prefs_common_unsafe_ssl_certs()) {
 		filename = g_strconcat(host, ".", port, ".", fp, ".cert", NULL);
-		subst_for_filename(filename);
-
-		ret = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
-			  "certs", G_DIR_SEPARATOR_S,
-			  filename, NULL);
 	} else {
 		filename = g_strconcat(host, ".", port, ".cert", NULL);
-		subst_for_filename(filename);
-
-		ret = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
-			  "certs", G_DIR_SEPARATOR_S,
-			  filename, NULL);
 	}
+	subst_for_filename(filename);
+
+	ret = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
+		  "certs", G_DIR_SEPARATOR_S,
+		  filename, NULL);
+
 	g_free(filename);
 	return ret;
 }

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list