Remove dead code
authorRicardo Mones <ricardo@mones.org>
Wed, 12 Sep 2018 14:59:24 +0000 (16:59 +0200)
committerRicardo Mones <ricardo@mones.org>
Wed, 12 Sep 2018 14:59:24 +0000 (16:59 +0200)
src/common/utils.c
src/common/utils.h
src/imap.c

index bf20ec3..33eb31d 100644 (file)
@@ -155,19 +155,6 @@ guint str_case_hash(gconstpointer key)
        return h;
 }
 
-void ptr_array_free_strings(GPtrArray *array)
-{
-       gint i;
-       gchar *str;
-
-       cm_return_if_fail(array != NULL);
-
-       for (i = 0; i < array->len; i++) {
-               str = g_ptr_array_index(array, i);
-               g_free(str);
-       }
-}
-
 gint to_number(const gchar *nstr)
 {
        register const gchar *p;
index c09032f..3573d40 100644 (file)
@@ -268,8 +268,6 @@ gint str_case_equal         (gconstpointer   v,
                                 gconstpointer   v2);
 guint str_case_hash            (gconstpointer   key);
 
-void ptr_array_free_strings    (GPtrArray      *array);
-
 /* number-string conversion */
 gint to_number                 (const gchar *nstr);
 gchar *itos_buf                        (gchar       *nstr,
index 23232f8..4982b61 100644 (file)
@@ -3210,19 +3210,15 @@ static FolderItem *imap_create_folder(Folder *folder, FolderItem *parent,
        strtailchomp(new_name, '/');
 
        if (strcasecmp(dirpath, "INBOX") != 0) {
-               GPtrArray *argbuf;
                int r;
                clist * lep_list;
                
-               argbuf = g_ptr_array_new();
                r = imap_threaded_list(folder, "", imap_path, &lep_list);
                if (r != MAILIMAP_NO_ERROR) {
                        imap_handle_error(SESSION(session), NULL, r);
                        log_warning(LOG_PROTOCOL, _("can't create mailbox: LIST failed\n"));
                        g_free(imap_path);
                        g_free(dirpath);
-                       ptr_array_free_strings(argbuf);
-                       g_ptr_array_free(argbuf, TRUE);
                        return NULL;
                }