]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
NFA API: Remove unused scratch ptr from struct mq
authorJustin Viiret <justin.viiret@intel.com>
Thu, 11 Feb 2016 05:51:59 +0000 (16:51 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 1 Mar 2016 00:34:38 +0000 (11:34 +1100)
src/nfa/nfa_api_queue.h
src/scratch.c
unit/internal/lbr.cpp
unit/internal/limex_nfa.cpp

index 59c18fcaefee022c7f2dc3e8933a2149ba33e332..1373425d84f1bd1e6c2999f07d3922a4f772fbcf 100644 (file)
@@ -91,7 +91,6 @@ struct mq {
                         * history buffer; (logically) immediately before the
                         * main buffer */
     size_t hlength; /**< length of the history buffer */
-    struct hs_scratch *scratch; /**< global scratch space */
     char report_current; /**<
                           * report_current matches at starting offset through
                           * callback. If true, the queue must be located at a
index 5771c8a70f6d3288c1a2ed3a6f4dde8926d10c49..854fc312553650f2f4ab0ad0c687f2406e4d88b5 100644 (file)
@@ -242,11 +242,6 @@ hs_error_t alloc_scratch(const hs_scratch_t *proto, hs_scratch_t **scratch) {
     // Don't get too big for your boots
     assert((size_t)(current - (char *)s) <= alloc_size);
 
-    // Init q->scratch ptr for every queue.
-    for (struct mq *qi = s->queues; qi != s->queues + queueCount; ++qi) {
-        qi->scratch = s;
-    }
-
     return HS_SUCCESS;
 }
 
index 00606141599a13dfd7958ee6ce2e8dabce328c1f..be53d9f399be2ef0159ca22dd190b4f73209ffe3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -120,7 +120,6 @@ protected:
         q.length = 0; // filled in by test
         q.history = nullptr;
         q.hlength = 0;
-        q.scratch = nullptr; // not needed by LBR
         q.report_current = 0;
         q.cb = onMatch;
         q.som_cb = nullptr; // only used by Haig
index 679dc67066820c711d32b38d9c6c0c6ed22aa09c..7c0b66e4bfd5df9ab3a652b3d886f175e06b3f30 100644 (file)
@@ -104,7 +104,6 @@ protected:
         q.length = SCAN_DATA.size();
         q.history = nullptr;
         q.hlength = 0;
-        q.scratch = scratch.get();
         q.report_current = 0;
         q.cb = onMatch;
         q.som_cb = nullptr; // only used by Haig
@@ -420,7 +419,6 @@ protected:
         q.length = ZOMBIE_SCAN_DATA.length();
         q.history = nullptr;
         q.hlength = 0;
-        q.scratch = scratch.get();
         q.report_current = 0;
         q.cb = onMatch;
         q.som_cb = nullptr; // only used by Haig