about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-07-05 11:08:22 +0200
committervan Hauser <vh@thc.org>2020-07-05 11:08:22 +0200
commit95fd080ca17743717d38b8b002d30b09a5a16748 (patch)
tree8c1ed5975c39fbf4c2f5c77434b1d15597656f9b
parent7d0af01d8ba1627238407a97496c0d21faf7a8fe (diff)
downloadafl++-95fd080ca17743717d38b8b002d30b09a5a16748.tar.gz
code format
-rw-r--r--libdislocator/libdislocator.so.c3
-rw-r--r--libtokencap/libtokencap.so.c16
-rw-r--r--llvm_mode/afl-llvm-rt.o.c10
-rw-r--r--llvm_mode/compare-transform-pass.so.cc4
4 files changed, 17 insertions, 16 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index b93f43c1..2324e390 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -205,10 +205,11 @@ static void *__dislocator_alloc(size_t len) {
   #elif defined(__sun)
   if (sp) {
 
-    base = (void *)(caddr_t)(1<<21);
+    base = (void *)(caddr_t)(1 << 21);
     flags |= MAP_ALIGN;
 
   }
+
   #endif
 #else
   (void)sp;
diff --git a/libtokencap/libtokencap.so.c b/libtokencap/libtokencap.so.c
index baf9fae6..21bac082 100644
--- a/libtokencap/libtokencap.so.c
+++ b/libtokencap/libtokencap.so.c
@@ -254,10 +254,10 @@ static void __tokencap_load_mappings(void) {
 
 #elif defined __sun
   prmap_t *c, *map;
-  char path[PATH_MAX];
-  ssize_t r;
-  size_t hint;
-  int fd;
+  char     path[PATH_MAX];
+  ssize_t  r;
+  size_t   hint;
+  int      fd;
 
   snprintf(path, sizeof(path), "/proc/%ld/map", getpid());
   fd = open(path, O_RDONLY);
@@ -266,14 +266,14 @@ static void __tokencap_load_mappings(void) {
 
   __tokencap_ro_loaded = 1;
 
-  for (; (r = pread(fd, map, hint, 0)) == hint; ) {
-    
-    hint <<= 1;	  
+  for (; (r = pread(fd, map, hint, 0)) == hint;) {
+
+    hint <<= 1;
     map = realloc(map, hint);
 
   }
 
-  for (c = map; r > 0; c++ , r -= sizeof(prmap_t)) {
+  for (c = map; r > 0; c++, r -= sizeof(prmap_t)) {
 
     __tokencap_ro[__tokencap_ro_cnt].st = c->pr_vaddr;
     __tokencap_ro[__tokencap_ro_cnt].en = c->pr_vaddr + c->pr_size;
diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c
index 9db43e35..0efde7aa 100644
--- a/llvm_mode/afl-llvm-rt.o.c
+++ b/llvm_mode/afl-llvm-rt.o.c
@@ -53,11 +53,11 @@
 #define CONST_PRIO 5
 
 #ifndef MAP_FIXED_NOREPLACE
-# ifdef MAP_EXCL
-   #define MAP_FIXED_NOREPLACE MAP_EXCL|MAP_FIXED
-#else
-   #define MAP_FIXED_NOREPLACE MAP_FIXED
-# endif
+  #ifdef MAP_EXCL
+    #define MAP_FIXED_NOREPLACE MAP_EXCL | MAP_FIXED
+  #else
+    #define MAP_FIXED_NOREPLACE MAP_FIXED
+  #endif
 #endif
 
 #include <sys/mman.h>
diff --git a/llvm_mode/compare-transform-pass.so.cc b/llvm_mode/compare-transform-pass.so.cc
index 5119d656..2f165ea6 100644
--- a/llvm_mode/compare-transform-pass.so.cc
+++ b/llvm_mode/compare-transform-pass.so.cc
@@ -474,8 +474,8 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
       if (cur_lenchk_bb) {
 
         IRBuilder<> cur_lenchk_IRB(&*(cur_lenchk_bb->getFirstInsertionPt()));
-        Value *     icmp = cur_lenchk_IRB.CreateICmpEQ(sizedValue,
-                                                  ConstantInt::get(sizedValue->getType(), i));
+        Value *     icmp = cur_lenchk_IRB.CreateICmpEQ(
+            sizedValue, ConstantInt::get(sizedValue->getType(), i));
         cur_lenchk_IRB.CreateCondBr(icmp, end_bb, cur_cmp_bb);
         cur_lenchk_bb->getTerminator()->eraseFromParent();