diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-02-21 12:17:30 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-02-21 20:18:02 +0000 |
commit | f3a68f00a1a9b7a3f28c6986713febaa81b92ba0 (patch) | |
tree | 8e7a1b3d321c4a0756ae885ab259c8862bd5979e /wsutil | |
parent | e35aa1ff486fc89c16d657a78575c6eb54d8bdc8 (diff) |
Rename the slower-but-portable mempbrk to ws_mempbrk_portable_exec().
That parallels ws_mempbrk_sse42_exec().
Change-Id: I1662badc6d1efab5bdd827f29bbad3712464ec43
Reviewed-on: https://code.wireshark.org/review/7301
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/ws_mempbrk.c | 4 | ||||
-rw-r--r-- | wsutil/ws_mempbrk_int.h | 2 | ||||
-rw-r--r-- | wsutil/ws_mempbrk_sse42.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/wsutil/ws_mempbrk.c b/wsutil/ws_mempbrk.c index 9f517a990c..28f6a61f7b 100644 --- a/wsutil/ws_mempbrk.c +++ b/wsutil/ws_mempbrk.c @@ -55,7 +55,7 @@ tvb_pbrk_compile(tvb_pbrk_pattern* pattern, const gchar *needles) const guint8 * -ws_mempbrk_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle) +ws_mempbrk_portable_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle) { const guint8 *haystack_end = haystack + haystacklen; @@ -80,7 +80,7 @@ tvb_pbrk_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern return ws_mempbrk_sse42_exec(haystack, haystacklen, pattern, found_needle); #endif - return ws_mempbrk_exec(haystack, haystacklen, pattern, found_needle); + return ws_mempbrk_portable_exec(haystack, haystacklen, pattern, found_needle); } diff --git a/wsutil/ws_mempbrk_int.h b/wsutil/ws_mempbrk_int.h index 356f2241cf..53f5a46617 100644 --- a/wsutil/ws_mempbrk_int.h +++ b/wsutil/ws_mempbrk_int.h @@ -22,7 +22,7 @@ #ifndef __WS_MEMPBRK_INT_H__ #define __WS_MEMPBRK_INT_H__ -const guint8 *ws_mempbrk_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle); +const guint8 *ws_mempbrk_portable_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); diff --git a/wsutil/ws_mempbrk_sse42.c b/wsutil/ws_mempbrk_sse42.c index eb2a408135..66b92c4417 100644 --- a/wsutil/ws_mempbrk_sse42.c +++ b/wsutil/ws_mempbrk_sse42.c @@ -135,7 +135,7 @@ ws_mempbrk_sse42_exec(const char *s, size_t slen, const tvb_pbrk_pattern* patter if (idx < 16 - offset) { /* found NUL @ 'idx', need to switch to slower mempbrk */ - return ws_mempbrk_exec(s + idx + 1, slen - idx - 1, pattern, found_needle); /* slen is bigger than 16 & idx < 16 so no undeflow here */ + return ws_mempbrk_portable_exec(s + idx + 1, slen - idx - 1, pattern, found_needle); /* slen is bigger than 16 & idx < 16 so no undeflow here */ } aligned += 16; slen -= (16 - offset); @@ -159,14 +159,14 @@ ws_mempbrk_sse42_exec(const char *s, size_t slen, const tvb_pbrk_pattern* patter if (zflag) { /* found NUL, need to switch to slower mempbrk */ - return ws_mempbrk_exec(aligned, slen, pattern, found_needle); + return ws_mempbrk_portable_exec(aligned, slen, pattern, found_needle); } aligned += 16; slen -= 16; } /* XXX, use mempbrk_slow here? */ - return ws_mempbrk_exec(aligned, slen, pattern, found_needle); + return ws_mempbrk_portable_exec(aligned, slen, pattern, found_needle); } #endif /* HAVE_SSE4_2 */ |