diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-25 20:58:57 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-25 20:58:57 +0100 |
commit | 94a86fe0a1d133afd8c3bd5c9f288e8089154a97 (patch) | |
tree | fcc1ce3b321d5d03c2458f1ac05ee7b94ab810d6 /contrib | |
parent | 3ed2a7526b4448a4b1db24149378bdaa4ffd4a8c (diff) | |
download | rspamd-94a86fe0a1d133afd8c3bd5c9f288e8089154a97.tar.gz rspamd-94a86fe0a1d133afd8c3bd5c9f288e8089154a97.zip |
Avoid large enums.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/aho-corasick/_acism.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/aho-corasick/_acism.h b/contrib/aho-corasick/_acism.h index b994bf073..057bc31c3 100644 --- a/contrib/aho-corasick/_acism.h +++ b/contrib/aho-corasick/_acism.h @@ -42,11 +42,9 @@ typedef int (*qsort_cmp)(const void *, const void *); typedef uint16_t SYMBOL; typedef unsigned _SYMBOL; // An efficient stacklocal SYMBOL -enum { - IS_MATCH = (TRAN)1 << (8*sizeof(TRAN) - 1), - IS_SUFFIX = (TRAN)1 << (8*sizeof(TRAN) - 2), - T_FLAGS = IS_MATCH | IS_SUFFIX -}; +#define IS_MATCH ((TRAN)1 << (8*sizeof(TRAN) - 1)) +#define IS_SUFFIX ((TRAN)1 << (8*sizeof(TRAN) - 2)) +#define T_FLAGS (IS_MATCH | IS_SUFFIX) typedef struct { STATE state; STRNO strno; } STRASH; |