Changeset 33501b2


Ignore:
Timestamp:
Jul 12, 2011, 10:35:04 PM (10 years ago)
Author:
Edward Z. Yang <ezyang@mit.edu>
Children:
825953e
Parents:
16cf182d
git-author:
Edward Z. Yang <ezyang@mit.edu> (07/12/11 22:34:38)
git-committer:
Edward Z. Yang <ezyang@mit.edu> (07/12/11 22:35:04)
Message:
Move actual truncation inside conditional.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    re4524da r33501b2  
    18121812  GPollFD *fd;
    18131813  int i;
    1814   if (len < event_source->fds->len)
     1814  if (len < event_source->fds->len) {
    18151815    owl_function_debugmsg("Truncating AIM PollFDs to %d, was %d", len, event_source->fds->len);
    1816   for (i = len; i < event_source->fds->len; i++) {
    1817     fd = event_source->fds->pdata[i];
    1818     g_source_remove_poll(&event_source->source, fd);
    1819     g_free(fd);
    1820   }
    1821   g_ptr_array_remove_range(event_source->fds, len, event_source->fds->len - len);
     1816    for (i = len; i < event_source->fds->len; i++) {
     1817      fd = event_source->fds->pdata[i];
     1818      g_source_remove_poll(&event_source->source, fd);
     1819      g_free(fd);
     1820    }
     1821    g_ptr_array_remove_range(event_source->fds, len, event_source->fds->len - len);
     1822  }
    18221823}
    18231824
Note: See TracChangeset for help on using the changeset viewer.