Changeset e6d7e4e for commands.c


Ignore:
Timestamp:
Jun 25, 2011, 3:26:15 AM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
ecffae6
Parents:
eb897c6
git-author:
David Benjamin <davidben@mit.edu> (03/11/11 11:39:41)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Replace the puntlist with an GPtrArray
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r6829afc re6d7e4e  
    24672467void owl_command_punt_unpunt(int argc, const char *const * argv, const char *buff, int unpunt)
    24682468{
    2469   owl_list * fl;
    2470   owl_filter * f;
     2469  GPtrArray * fl;
    24712470  int i;
    24722471
     
    24782477    if(unpunt && (i=atoi(argv[1])) !=0) {
    24792478      i--;      /* Accept 1-based indexing */
    2480       if(i < owl_list_get_size(fl)) {
    2481         f = owl_list_get_element(fl, i);
    2482         owl_list_remove_element(fl, i);
    2483         owl_filter_delete(f);
     2479      if (i < fl->len) {
     2480        owl_filter_delete(g_ptr_array_remove_index(fl, i));
    24842481        return;
    24852482      } else {
Note: See TracChangeset for help on using the changeset viewer.