about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/afl-clang-fast.c8
-rw-r--r--llvm_mode/afl-llvm-common.cc8
-rw-r--r--llvm_mode/afl-llvm-lto-instrumentation.so.cc8
3 files changed, 13 insertions, 11 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 6ea98111..173dc268 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -812,16 +812,24 @@ int main(int argc, char **argv, char **envp) {
 
         ptr += strlen("ngram");
         while (*ptr && (*ptr < '0' || *ptr > '9')) {
+
           ptr++;
+
         }
+
         if (!*ptr) {
+
           ptr = getenv("AFL_LLVM_NGRAM_SIZE");
           if (!ptr || !*ptr) {
+
             FATAL(
                 "you must set the NGRAM size with (e.g. for value 2) "
                 "AFL_LLVM_INSTRUMENT=ngram-2");
+
           }
+
         }
+
         ngram_size = atoi(ptr);
         if (ngram_size < 2 || ngram_size > NGRAM_SIZE_MAX)
           FATAL(
diff --git a/llvm_mode/afl-llvm-common.cc b/llvm_mode/afl-llvm-common.cc
index 7dd5a02a..189b4ec6 100644
--- a/llvm_mode/afl-llvm-common.cc
+++ b/llvm_mode/afl-llvm-common.cc
@@ -344,14 +344,10 @@ static std::string getSourceName(llvm::Function *F) {
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7)
   if (Loc) {
 
-    StringRef instFilename;
+    StringRef   instFilename;
     DILocation *cDILoc = dyn_cast<DILocation>(Loc.getAsMDNode());
 
-    if (cDILoc) {
-
-      instFilename = cDILoc->getFilename();
-
-    }
+    if (cDILoc) { instFilename = cDILoc->getFilename(); }
 
     if (instFilename.str().empty()) {
 
diff --git a/llvm_mode/afl-llvm-lto-instrumentation.so.cc b/llvm_mode/afl-llvm-lto-instrumentation.so.cc
index c25cad9d..b8d9fce9 100644
--- a/llvm_mode/afl-llvm-lto-instrumentation.so.cc
+++ b/llvm_mode/afl-llvm-lto-instrumentation.so.cc
@@ -379,11 +379,9 @@ bool AFLLTOPass::runOnModule(Module &M) {
             else
               Str1 = TmpStr.str();
             bool HasStr2 = getConstantStringInfo(Str2P, TmpStr);
-            if (TmpStr.empty())
-              HasStr2 = false;
-              (void) HasStr2 /* never read */
-            else
-              Str2 = TmpStr.str();
+            if (TmpStr.empty()) HasStr2 = false;
+            (void)HasStr2                                     /* never read */
+                else Str2 = TmpStr.str();
 
             if (debug)
               fprintf(stderr, "F:%s %p(%s)->\"%s\"(%s) %p(%s)->\"%s\"(%s)\n",