diff options
| author | Kostya Serebryany <kcc@google.com> | 2017-05-15 17:39:42 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2017-05-15 17:39:42 +0000 |
| commit | e8a49b38508fac85b065bb8e174d46bb566036ef (patch) | |
| tree | 1c04eaa8a772ca424d2c7253e92cc405e745bba7 /llvm/lib/Fuzzer | |
| parent | 6da813336cc5f7f64d4771d3528fea05209e1844 (diff) | |
| download | bcm5719-llvm-e8a49b38508fac85b065bb8e174d46bb566036ef.tar.gz bcm5719-llvm-e8a49b38508fac85b065bb8e174d46bb566036ef.zip | |
[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian Holler. This also fixes a logical bug, which however does not affect the libFuzzer's ability too much (I wasn't able to create a differentiating test)
llvm-svn: 303087
Diffstat (limited to 'llvm/lib/Fuzzer')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerMutate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerMutate.cpp b/llvm/lib/Fuzzer/FuzzerMutate.cpp index a84e6eeb42a..e60d4130de1 100644 --- a/llvm/lib/Fuzzer/FuzzerMutate.cpp +++ b/llvm/lib/Fuzzer/FuzzerMutate.cpp @@ -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); |

