[fuzzer] minor cleanup based on reviews: remove redundant includes, fix a copy-pasto...
authorKostya Serebryany <kcc@google.com>
Thu, 29 Jan 2015 17:16:23 +0000 (17:16 +0000)
committerKostya Serebryany <kcc@google.com>
Thu, 29 Jan 2015 17:16:23 +0000 (17:16 +0000)
llvm-svn: 227468

llvm/lib/Fuzzer/FuzzerLoop.cpp
llvm/lib/Fuzzer/test/InfiniteTest.cpp
llvm/lib/Fuzzer/test/TimeoutTest.cpp

index 1f2193a..dcfc965 100644 (file)
@@ -12,9 +12,7 @@
 #include "FuzzerInternal.h"
 #include <sanitizer/asan_interface.h>
 #include <algorithm>
-#include <string>
 #include <iostream>
-#include <stdlib.h>
 
 // This function should be defined by the user.
 extern "C" void TestOneInput(const uint8_t *Data, size_t Size);
index ee1635d..dcb3030 100644 (file)
@@ -12,7 +12,7 @@ extern "C" void TestOneInput(const uint8_t *Data, size_t Size) {
     if (Size > 1 && Data[1] == 'i') {
       Sink = 2;
       if (Size > 2 && Data[2] == '!') {
-        Size = 2;
+        Sink = 2;
       }
     }
   }
index 266ead6..23683ce 100644 (file)
@@ -12,7 +12,7 @@ extern "C" void TestOneInput(const uint8_t *Data, size_t Size) {
     if (Size > 1 && Data[1] == 'i') {
       Sink = 2;
       if (Size > 2 && Data[2] == '!') {
-        Size = 2;
+        Sink = 2;
         while (Sink)
           ;
       }