Skip to content
  • Nick Mathewson's avatar
    Autoconvert most circuit-list iterations to smartlist iterations · 6969bd9a
    Nick Mathewson authored
    Breaks compilation.
    
    Used this coccinelle script:
    
    @@
    identifier c;
    typedef circuit_t;
    iterator name TOR_LIST_FOREACH;
    iterator name SMARTLIST_FOREACH_BEGIN;
    statement S;
    @@
    - circuit_t *c;
       ...
    - TOR_LIST_FOREACH(c, \(&global_circuitlist\|circuit_get_global_list()\), head)
    + SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, c)
      S
    + SMARTLIST_FOREACH_END(c);
    6969bd9a