Changeset 5e5f08f


Ignore:
Timestamp:
Mar 7, 2010, 10:26:04 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0e57335
Parents:
8c59178
git-author:
Anders Kaseorg <andersk@mit.edu> (02/27/10 20:39:13)
git-committer:
Anders Kaseorg <andersk@mit.edu> (03/07/10 22:26:04)
Message:
Make owl_list_free_simple a special case of owl_list_cleanup.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Nelson Elhage <nelhage@mit.edu>
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    re9c6fc8 r5e5f08f  
    16161616  }
    16171617  owl_function_aimsearch_results(address, &list);
    1618   owl_list_free_simple(&list);
     1618  owl_list_cleanup(&list, NULL);
    16191619  return(1);
    16201620}
  • list.c

    r8c59178 r5e5f08f  
    8181  int i;
    8282
    83   for (i=0; i<l->size; i++) {
    84     (elefree)(l->list[i]);
     83  if (elefree) {
     84    for (i = 0; i < l->size; i++) {
     85      (elefree)(l->list[i]);
     86    }
    8587  }
    8688  owl_free(l->list);
    8789}
    88 
    89 void owl_list_free_simple(owl_list *l)
    90 {
    91   if (l->list) owl_free(l->list);
    92 }
  • message.c

    r7ab0020 r5e5f08f  
    963963  }
    964964
    965   owl_list_free_simple(&(m->attributes));
     965  owl_list_cleanup(&(m->attributes), NULL);
    966966 
    967967  owl_message_invalidate_format(m);
  • messagelist.c

    r91634ec r5e5f08f  
    8282
    8383  /* free the old list */
    84   owl_list_free_simple(&(ml->list));
     84  owl_list_cleanup(&(ml->list), NULL);
    8585
    8686  /* copy the new list to the old list */
  • view.c

    rc3a47c9 r5e5f08f  
    3838
    3939  /* nuke the old list */
    40   owl_list_free_simple(&ml->list);
     40  owl_list_cleanup(&ml->list, NULL);
    4141  owl_messagelist_create(&(v->ml));
    4242
     
    159159void owl_view_free(owl_view *v)
    160160{
    161   owl_list_free_simple(&v->ml.list);
     161  owl_list_cleanup(&v->ml.list, NULL);
    162162  if (v->name) owl_free(v->name);
    163163}
Note: See TracChangeset for help on using the changeset viewer.