]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
decode: turn no payload/packet inspect macros into funcs
authorVictor Julien <vjulien@oisf.net>
Mon, 2 May 2022 19:27:43 +0000 (21:27 +0200)
committerVictor Julien <vjulien@oisf.net>
Thu, 9 Jun 2022 05:26:57 +0000 (07:26 +0200)
Remove unused unset macros.

src/decode.h

index c766695801772e0874c73fea14b22cc0dcf4eeff..f4d6b5b52f61533ad96c4b76afa3438d65ecd779 100644 (file)
@@ -1058,30 +1058,6 @@ void DecodeGlobalConfig(void);
 void PacketAlertGetMaxConfig(void);
 void DecodeUnregisterCounters(void);
 
-/** \brief Set the No payload inspection Flag for the packet.
- *
- * \param p Packet to set the flag in
- */
-#define DecodeSetNoPayloadInspectionFlag(p) do { \
-        (p)->flags |= PKT_NOPAYLOAD_INSPECTION;  \
-    } while (0)
-
-#define DecodeUnsetNoPayloadInspectionFlag(p) do { \
-        (p)->flags &= ~PKT_NOPAYLOAD_INSPECTION;  \
-    } while (0)
-
-/** \brief Set the No packet inspection Flag for the packet.
- *
- * \param p Packet to set the flag in
- */
-#define DecodeSetNoPacketInspectionFlag(p) do { \
-        (p)->flags |= PKT_NOPACKET_INSPECTION;  \
-    } while (0)
-#define DecodeUnsetNoPacketInspectionFlag(p) do { \
-        (p)->flags &= ~PKT_NOPACKET_INSPECTION;  \
-    } while (0)
-
-
 #define ENGINE_SET_EVENT(p, e) do { \
     SCLogDebug("p %p event %d", (p), e); \
     if ((p)->events.cnt < PACKET_ENGINE_EVENT_MAX) { \
@@ -1269,6 +1245,24 @@ static inline bool PacketIncreaseCheckLayers(Packet *p)
     return true;
 }
 
+/** \brief Set the No payload inspection Flag for the packet.
+ *
+ * \param p Packet to set the flag in
+ */
+static inline void DecodeSetNoPayloadInspectionFlag(Packet *p)
+{
+    p->flags |= PKT_NOPAYLOAD_INSPECTION;
+}
+
+/** \brief Set the No packet inspection Flag for the packet.
+ *
+ * \param p Packet to set the flag in
+ */
+static inline void DecodeSetNoPacketInspectionFlag(Packet *p)
+{
+    p->flags |= PKT_NOPACKET_INSPECTION;
+}
+
 /** \brief return true if *this* packet needs to trigger a verdict.
  *
  *  If we have the root packet, and we have none outstanding,