about summary refs log tree commit diff
path: root/custom_mutators/gramatron/test.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-07-14 10:18:23 +0200
committervanhauser-thc <vh@thc.org>2024-07-14 10:18:23 +0200
commitccb952dde8dbf2165a0d84308e558cd68679fb13 (patch)
treeaa6f0c11c8fe554cc3facb3c1a76ac9ec9822594 /custom_mutators/gramatron/test.c
parent7c380a6612f00e4a7ed02364dc2b3769e8edc8f8 (diff)
downloadafl++-ccb952dde8dbf2165a0d84308e558cd68679fb13.tar.gz
Revert "Replace gettimeofday with clock_gettime (#2159)"
This reverts commit 7c380a6612f00e4a7ed02364dc2b3769e8edc8f8.
Diffstat (limited to 'custom_mutators/gramatron/test.c')
-rw-r--r--custom_mutators/gramatron/test.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/custom_mutators/gramatron/test.c b/custom_mutators/gramatron/test.c
index 3577faa1..0dfbc197 100644
--- a/custom_mutators/gramatron/test.c
+++ b/custom_mutators/gramatron/test.c
@@ -8,8 +8,8 @@
 state *create_pda(u8 *automaton_file) {
 
   struct json_object *parsed_json;
-  state              *pda;
-  json_object        *source_obj, *attr;
+  state *             pda;
+  json_object *       source_obj, *attr;
   int                 arraylen, ii, ii2, trigger_len, error;
 
   printf("\n[GF] Automaton file passed:%s", automaton_file);
@@ -41,7 +41,7 @@ state *create_pda(u8 *automaton_file) {
   enum json_type type;
   json_object_object_foreach(source_obj, key, val) {
 
-    state   *state_ptr;
+    state *  state_ptr;
     trigger *trigger_ptr;
     int      offset;
 
@@ -97,12 +97,12 @@ state *create_pda(u8 *automaton_file) {
 
 void SanityCheck(char *automaton_path) {
 
-  state         *pda = create_pda(automaton_path);
+  state *        pda = create_pda(automaton_path);
   int            count = 0, state;
   Get_Dupes_Ret *getdupesret;
-  IdxMap_new    *statemap;
-  IdxMap_new    *statemap_ptr;
-  terminal      *term_ptr;
+  IdxMap_new *   statemap;
+  IdxMap_new *   statemap_ptr;
+  terminal *     term_ptr;
 
   while (count < NUMINPUTS) {
 
@@ -117,9 +117,12 @@ void SanityCheck(char *automaton_path) {
 
 int main(int argc, char *argv[]) {
 
-  char *mode;
-  char *automaton_path;
-  char *output_dir = NULL;
+  char *         mode;
+  char *         automaton_path;
+  char *         output_dir = NULL;
+  struct timeval tv;
+  struct timeval tz;
+  // gettimeofday(&tv, &tz);
   srand(1337);
   if (argc == 3) {