Changeset 4d86e06 for select.c


Ignore:
Timestamp:
Jul 23, 2009, 12:53:57 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
ba6c8bd
Parents:
029a8b5
Message:
Get rid of a whole bunch of useless casts.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • select.c

    rd43edd2 r4d86e06  
    9090  len = owl_list_get_size(dl);
    9191  for(i = 0; i < len; i++) {
    92     d = (owl_dispatch*)owl_list_get_element(dl, i);
     92    d = owl_list_get_element(dl, i);
    9393    if (d->fd == fd) return i;
    9494  }
     
    102102
    103103  dl = owl_global_get_dispatchlist(&g);
    104   d = (owl_dispatch*)owl_list_get_element(dl, elt);
     104  d = owl_list_get_element(dl, elt);
    105105  owl_list_remove_element(dl, elt);
    106106  if (d->destroy) {
     
    122122  if (elt != -1) {  /* If we have a dispatch for this FD */
    123123    owl_dispatch *d_old;
    124     d_old = (owl_dispatch*)owl_list_get_element(dl, elt);
     124    d_old = owl_list_get_element(dl, elt);
    125125    /* Ignore if we're adding the same dispatch again.  Otherwise
    126126       replace the old dispatch. */
     
    145145    /* Defer the removal until dispatch is done walking the list */
    146146    dl = owl_global_get_dispatchlist(&g);
    147     d = (owl_dispatch*)owl_list_get_element(dl, elt);
     147    d = owl_list_get_element(dl, elt);
    148148    d->needs_gc = 1;
    149149  } else {
     
    163163  elt = owl_select_find_dispatch(fd);
    164164  if (elt != -1) {
    165     d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
     165    d = owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
    166166    if (d->cfunc != owl_perlconfig_dispatch) {
    167167      /* don't mess with non-perl dispatch functions from here. */
     
    186186  elt = owl_select_find_dispatch(fd);
    187187  if (elt != -1) {
    188     d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
     188    d = owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
    189189    if (d->cfunc == owl_perlconfig_dispatch) {
    190190      owl_select_remove_dispatch_at(elt);
     
    207207  len = owl_select_dispatch_count(g);
    208208  for(i = 0; i < len; i++) {
    209     d = (owl_dispatch*)owl_list_get_element(dl, i);
     209    d = owl_list_get_element(dl, i);
    210210    FD_SET(d->fd, r);
    211211    FD_SET(d->fd, e);
     
    245245
    246246  for(i = 0; i < len; i++) {
    247     d = (owl_dispatch*)owl_list_get_element(dl, i);
     247    d = owl_list_get_element(dl, i);
    248248    /* While d shouldn't normally be null, the list may be altered by
    249249     * functions we dispatch to. */
Note: See TracChangeset for help on using the changeset viewer.