Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce scope for variable.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Oct 2017 21:43:39 +0000 (23:43 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 5 Oct 2017 06:53:22 +0000 (08:53 +0200)
src/mc/checker/LivenessChecker.cpp

index df9cd03..42ce4dc 100644 (file)
@@ -392,9 +392,8 @@ void LivenessChecker::run()
     }
 
     /* Pair already visited ? stop the exploration on the current path */
     }
 
     /* Pair already visited ? stop the exploration on the current path */
-    int visited_num = -1;
     if (not current_pair->exploration_started) {
     if (not current_pair->exploration_started) {
-      visited_num = this->insertVisitedPair(reached_pair, current_pair.get());
+      int visited_num = this->insertVisitedPair(reached_pair, current_pair.get());
       if (visited_num != -1) {
         if (dot_output != nullptr) {
           fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", this->previousPair_, visited_num,
       if (visited_num != -1) {
         if (dot_output != nullptr) {
           fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", this->previousPair_, visited_num,