about summary refs log tree commit diff
path: root/src/afl-fuzz-init.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2020-09-05 13:19:19 +0200
committervanhauser-thc <vh@thc.org>2020-09-05 13:19:19 +0200
commit2f90f2faba92c0ef5e081ff74b54fb07eb1faaa9 (patch)
tree8ddfccbd1594c3f3c50025eb8cbe23f84a10fa20 /src/afl-fuzz-init.c
parente30b2c6af6e369844c92c00a20ebdd53473a747c (diff)
downloadafl++-2f90f2faba92c0ef5e081ff74b54fb07eb1faaa9.tar.gz
code-format
Diffstat (limited to 'src/afl-fuzz-init.c')
-rw-r--r--src/afl-fuzz-init.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 1351d274..c834e5db 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -617,24 +617,27 @@ void read_testcases(afl_state_t *afl, u8 *directory) {
   s32             nl_cnt, subdirs = 1;
   u32             i;
   u8 *            fn1, *dir = directory;
-  u8 val_buf[2][STRINGIFY_VAL_SIZE_MAX];
+  u8              val_buf[2][STRINGIFY_VAL_SIZE_MAX];
 
   /* Auto-detect non-in-place resumption attempts. */
 
-if (dir == NULL) {
-  fn1 = alloc_printf("%s/queue", afl->in_dir);
-  if (!access(fn1, F_OK)) {
+  if (dir == NULL) {
 
-    afl->in_dir = fn1;
-    subdirs = 0;
+    fn1 = alloc_printf("%s/queue", afl->in_dir);
+    if (!access(fn1, F_OK)) {
 
-  } else {
+      afl->in_dir = fn1;
+      subdirs = 0;
+
+    } else {
 
-    ck_free(fn1);
+      ck_free(fn1);
+
+    }
+
+    dir = afl->in_dir;
 
   }
-  dir = afl->in_dir;
-}
 
   ACTF("Scanning '%s'...", dir);