[Commits] [SCM] claws branch, master, updated. 3.17.3-139-g7ed4e3b
ticho at claws-mail.org
ticho at claws-mail.org
Wed Mar 13 20:58:29 CET 2019
The branch, master has been updated
via 7ed4e3b5db58b2df89820d06390c307ea2271faa (commit)
from 94522bfdafad5e4d36bfadd65e626ca8540119fa (commit)
Summary of changes:
src/addressbook.c | 3 ---
src/addrindex.c | 4 ++--
src/addritem.c | 2 --
src/common/mgutils.c | 12 ------------
src/common/mgutils.h | 1 -
5 files changed, 2 insertions(+), 20 deletions(-)
- Log -----------------------------------------------------------------
commit 7ed4e3b5db58b2df89820d06390c307ea2271faa
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Wed Mar 13 20:55:36 2019 +0100
Remove mgu_clear_list() function
Its remaining uses were unnecessary, because in each
case, the list was being freed immediately afterwards,
without freeing the data. This function only set the
list items' data pointer to NULL, which served no
purpose here.
diff --git a/src/addressbook.c b/src/addressbook.c
index 6eff3db..9f9e287 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -3777,7 +3777,6 @@ static void addressbook_folder_load_person( GtkCMCTree *clist, ItemFolder *itemF
addressbook_folder_load_one_person( clist, cur->data, atci, atciMail );
}
/* Free up the list */
- mgu_clear_list( items );
g_list_free( items );
}
@@ -3855,7 +3854,6 @@ static void addressbook_folder_load_group( GtkCMCTree *clist, ItemFolder *itemFo
gtk_sctree_sort_node(clist, NULL);
}
/* Free up the list */
- mgu_clear_list( items );
g_list_free( items );
}
@@ -5254,7 +5252,6 @@ static void addrbookctl_build_ifselect( void ) {
g_free( selectStr );
/* Replace existing list */
- mgu_clear_list( _addressIFaceSelection_ );
g_list_free( _addressIFaceSelection_ );
_addressIFaceSelection_ = newList;
newList = NULL;
diff --git a/src/addrindex.c b/src/addrindex.c
index 62d4aa9..dff2c93 100644
--- a/src/addrindex.c
+++ b/src/addrindex.c
@@ -2960,8 +2960,8 @@ gboolean addrindex_load_completion(
nodeM = g_list_next( nodeM );
}
}
- /* Free up the list */
- mgu_clear_list( items );
+ /* Free up the list (but not the data inside the
+ * individual list items) */
g_list_free( items );
return TRUE;
diff --git a/src/addritem.c b/src/addritem.c
index cb76257..832a139 100644
--- a/src/addritem.c
+++ b/src/addritem.c
@@ -688,7 +688,6 @@ void addritem_free_item_group( ItemGroup *group ) {
g_free( ADDRITEM_ID(group) );
g_free( ADDRITEM_NAME(group) );
g_free( group->remarks );
- mgu_clear_list( group->listEMail );
g_list_free( group->listEMail );
ADDRITEM_TYPE(group) = ITEMTYPE_NONE;
@@ -864,7 +863,6 @@ void addritem_free_item_folder( ItemFolder *folder ) {
g_free( ADDRITEM_ID(folder) );
g_free( ADDRITEM_NAME(folder) );
g_free( folder->remarks );
- mgu_clear_list( folder->listItems );
g_list_free( folder->listItems );
ADDRITEM_TYPE(folder) = ITEMTYPE_NONE;
diff --git a/src/common/mgutils.c b/src/common/mgutils.c
index e15207b..941fc26 100644
--- a/src/common/mgutils.c
+++ b/src/common/mgutils.c
@@ -134,18 +134,6 @@ gchar *mgu_replace_string( gchar *str, const gchar *value ) {
}
/*
-* Clear a linked list by setting node data pointers to NULL. Note that
-* items are not freed.
-*/
-void mgu_clear_list( GList *list ) {
- GList *node = list;
- while( node ) {
- node->data = NULL;
- node = g_list_next( node );
- }
-}
-
-/*
* Test and reformat an email address.
* Enter: address.
* Return: Address, or NULL if address is empty.
diff --git a/src/common/mgutils.h b/src/common/mgutils.h
index 15555362..6e944c2 100644
--- a/src/common/mgutils.h
+++ b/src/common/mgutils.h
@@ -47,7 +47,6 @@ void mgu_free_list ( GSList *list );
void mgu_free_dlist ( GList *list );
gchar *mgu_list_coalesce ( GSList *list );
gchar *mgu_replace_string ( gchar *str, const gchar *value );
-void mgu_clear_list ( GList *list );
gchar *mgu_email_check_empty ( gchar *address );
GList *mgu_parse_string ( gchar *line, const gint maxTokens,
gint *tokenCnt );
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list