Changeset 23fddad for owl.c


Ignore:
Timestamp:
Oct 23, 2009, 11:01:30 PM (12 years ago)
Author:
Karl Ramm <kcr@1ts.org>
Branches:
master, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
8590774
Parents:
52761cc
git-author:
Karl Ramm <kcr@1ts.org> (09/30/09 10:12:27)
git-committer:
Karl Ramm <kcr@1ts.org> (10/23/09 23:01:30)
Message:
refactor & rename filter creation & storage management

filter_init_fromstring -> filter_new_fromstring
filter_init -> filter_new
filter_free -> filter_delete

Every time owl_filter_init and owl_filter_init_fromstring were called,
there was a call to malloc right above them;  Conversely, after every
owl_filter_free there needed to be a call to owl_free (and sometimes
there wasn't).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r84ea53c r23fddad  
    151151static void owl_setup_default_filters(void)
    152152{
    153   owl_filter *f;
    154153  int i;
    155154  static const struct {
     
    176175  owl_function_debugmsg("startup: creating default filters");
    177176
    178   for (i = 0; filters[i].name != NULL; i++) {
    179     f = owl_malloc(sizeof(owl_filter));
    180     owl_filter_init_fromstring(f, filters[i].name, filters[i].desc);
    181     owl_list_append_element(owl_global_get_filterlist(&g), f);
    182   }
     177  for (i = 0; filters[i].name != NULL; i++)
     178    owl_list_append_element(owl_global_get_filterlist(&g),
     179                            owl_filter_new_fromstring(filters[i].name,
     180                                                      filters[i].desc));
    183181}
    184182
Note: See TracChangeset for help on using the changeset viewer.