[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)
committerMaria Guseva <m.guseva@samsung.com>
Tue, 11 Jul 2017 02:46:03 +0000 (11:46 +0900)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303087 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerMutate.cpp

index a84e6eeb42a483a7607f7454a7d2c7174cb0781a..e60d4130de106edeaa34d1602787e3a8547440dc 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);