[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian...
authorKostya Serebryany <kcc@google.com>
Mon, 15 May 2017 17:39:42 +0000 (17:39 +0000)
committerKostya Serebryany <kcc@google.com>
Mon, 15 May 2017 17:39:42 +0000 (17:39 +0000)
llvm-svn: 303087

llvm/lib/Fuzzer/FuzzerMutate.cpp

index a84e6ee..e60d413 100644 (file)
@@ -222,7 +222,7 @@ DictionaryEntry MutationDispatcher::MakeDictionaryEntryFromCMP(
       if (!Cur) break;
       Positions[NumPositions++] = Cur - Data;
     }
-    if (!NumPositions) break;
+    if (!NumPositions) continue;
     return DictionaryEntry(W, Positions[Rand(NumPositions)]);
   }
   DictionaryEntry DE(W);