[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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227468 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 1f2193a45b34462884039c509836eb95cfd8001e..dcfc965f6bf766842f3b8f7f1eb22fa664f1e82b 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 ee1635d199680dfdbd9b6ab75f13fea27d98cc87..dcb3030413b9953ac7a16f177d6789913416df5c 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 266ead646a551d46068d4085c55831519dba73ab..23683ce866c234bd86271696c82b528a5e91b4ef 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)
           ;
       }