Browse Source

exchanged code containing goto with a do while loop (#1758)

exchanged code containing goto with a do while loop
ppa-0.6.1
Rene Pickhardt 7 years ago
committed by Christian Decker
parent
commit
88ef2246e8
  1. 6
      lightningd/watch.c

6
lightningd/watch.c

@ -270,8 +270,7 @@ void watch_topology_changed(struct chain_topology *topo)
struct txwatch_hash_iter i;
struct txwatch *w;
bool needs_rerun;
again:
do {
/* Iterating a htable during deletes is safe, but might skip entries. */
needs_rerun = false;
for (w = txwatch_hash_first(&topo->txwatches, &i);
@ -283,6 +282,5 @@ again:
if (depth)
needs_rerun |= txw_fire(w, &w->txid, depth);
}
if (needs_rerun)
goto again;
} while (needs_rerun);
}

Loading…
Cancel
Save