[Commits] [SCM] claws branch, master, updated. 3.17.2-5-g319dee6

ticho at claws-mail.org ticho at claws-mail.org
Sat Dec 15 18:32:19 CET 2018


The branch, master has been updated
       via  319dee62ddeead3c7c05e46f95f8b2dd50de0c2c (commit)
      from  dd3e5698bdea27a9366a5eb636636f4112900393 (commit)

Summary of changes:
 src/action.c       |    2 +-
 src/common/utils.c |    8 --------
 src/common/utils.h |    2 --
 3 files changed, 1 insertion(+), 11 deletions(-)


- Log -----------------------------------------------------------------
commit 319dee62ddeead3c7c05e46f95f8b2dd50de0c2c
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Dec 15 18:32:05 2018 +0100

    Remove strstr2() in favour of g_strstr_len()

diff --git a/src/action.c b/src/action.c
index 0c905f2..f40e163 100644
--- a/src/action.c
+++ b/src/action.c
@@ -704,7 +704,7 @@ static gboolean execute_filtering_actions(gchar *action, GSList *msglist)
 		mainwin = mainwindow_get_mainwindow();
 	}
 
-	if (NULL == (sbegin = strstr2(action, "%as{")))
+	if (NULL == (sbegin = g_strstr_len(action, -1, "%as{")))
 		return FALSE;
 	sbegin += sizeof "%as{" - 1;
 	if (NULL == (send = strrchr(sbegin, '}')))
diff --git a/src/common/utils.c b/src/common/utils.c
index aa29659..b9a6f95 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -218,14 +218,6 @@ gchar *to_human_readable(goffset size)
 	}
 }
 
-/* strstr with NULL-checking */
-gchar *strstr2(const gchar *s1, const gchar *s2)
-{
-	if (s1 == NULL || s2 == NULL)
-		return NULL;
-	else
-		return strstr(s1, s2);
-}
 /* compare paths */
 gint path_cmp(const gchar *s1, const gchar *s2)
 {
diff --git a/src/common/utils.h b/src/common/utils.h
index d891b41..445d1e3 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -271,8 +271,6 @@ gchar *itos			(gint	      n);
 gchar *to_human_readable	(goffset      size);
 
 /* alternative string functions */
-gchar *strstr2		(const gchar	*s1,
-			 const gchar	*s2);
 gint path_cmp		(const gchar	*s1,
 			 const gchar	*s2);
 gchar *strretchomp	(gchar		*str);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list