From 53a4f1f5edbe67d4cb5c47c1faa687deccc04610 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Wed, 26 Sep 2012 11:16:17 -0700 Subject: [PATCH] model: bugfix - iterator naming conflict There's already another iterator named 'it' in resolve_release_sequences(). Although this iterator probably will mask the earlier iterator (giving correct behavior), it's probably safer to rename the later one for clarity. --- model.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model.cc b/model.cc index 3593cef..fdefcc2 100644 --- a/model.cc +++ b/model.cc @@ -1279,9 +1279,9 @@ bool ModelChecker::resolve_release_sequences(void *location, work_queue_t *work_ work_queue->push_back(MOEdgeWorkEntry(act)); /* propagate synchronization to later actions */ - action_list_t::reverse_iterator it = action_trace->rbegin(); - for (; (*it) != act; it++) { - ModelAction *propagate = *it; + action_list_t::reverse_iterator rit = action_trace->rbegin(); + for (; (*rit) != act; rit++) { + ModelAction *propagate = *rit; if (act->happens_before(propagate)) { propagate->synchronize_with(act); /* Re-check 'propagate' for mo_graph edges */ -- 2.34.1