mswsp: Remove null check (CID1355407)
[jlayton/wireshark.git] / wsutil / ws_mempbrk.h
index 40c7e5595c46d7ae903de7d3427025c9828ea3e6..74129c319564372e365650c88bff6a5c78919db4 100644 (file)
@@ -28,7 +28,7 @@
 #include <emmintrin.h>
 #endif
 
-/** The pattern object used for tvb_pbrk_pattern_guint8().
+/** The pattern object used for ws_mempbrk_exec().
  */
 typedef struct {
     gchar patt[256];
@@ -36,20 +36,14 @@ typedef struct {
     gboolean use_sse42;
     __m128i mask;
 #endif
-} tvb_pbrk_pattern;
+} ws_mempbrk_pattern;
 
-/** Compile the pattern for the needles to find using tvb_pbrk_pattern_guint8().
+/** Compile the pattern for the needles to find using ws_mempbrk_exec().
  */
-WS_DLL_PUBLIC void tvb_pbrk_compile(tvb_pbrk_pattern* pattern, const gchar *needles);
-
-WS_DLL_PUBLIC const guint8 *tvb_pbrk_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle);
-
-#ifdef HAVE_SSE4_2
-void ws_mempbrk_sse42_compile(tvb_pbrk_pattern* pattern, const gchar *needles);
-const char *ws_mempbrk_sse42_exec(const char* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle);
-#endif
-
-const guint8 *ws_mempbrk_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle);
+WS_DLL_PUBLIC void ws_mempbrk_compile(ws_mempbrk_pattern* pattern, const gchar *needles);
 
+/** Scan for the needles specified by the compiled pattern.
+ */
+WS_DLL_PUBLIC const guint8 *ws_mempbrk_exec(const guint8* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, guchar *found_needle);
 
 #endif /* __WS_MEMPBRK_H__ */