aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Mohr <andi@rhlx01.fht-esslingen.de>2006-09-29 05:01:28 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:23 -0400
commit1497b2749babb01458a6d9dfd4dfb493b3d388f2 (patch)
tree7b1d39c22a6b3a730cd9e19c8c22dcd05b8229bf /lib
parent4050914f7c2665736a82265a029466071a90094e (diff)
[PATCH] lib/ts_fsm.c: constify structs
Constify two structs. Correct some typos. Compile-tested and run-tested (module inserted) on 2.6.18-rc4-mm3. Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ts_fsm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c
index 87847c2ae9e2..af575b61526b 100644
--- a/lib/ts_fsm.c
+++ b/lib/ts_fsm.c
@@ -12,13 +12,13 @@
12 * 12 *
13 * A finite state machine consists of n states (struct ts_fsm_token) 13 * A finite state machine consists of n states (struct ts_fsm_token)
14 * representing the pattern as a finite automation. The data is read 14 * representing the pattern as a finite automation. The data is read
15 * sequentially on a octet basis. Every state token specifies the number 15 * sequentially on an octet basis. Every state token specifies the number
16 * of recurrences and the type of value accepted which can be either a 16 * of recurrences and the type of value accepted which can be either a
17 * specific character or ctype based set of characters. The available 17 * specific character or ctype based set of characters. The available
18 * type of recurrences include 1, (0|1), [0 n], and [1 n]. 18 * type of recurrences include 1, (0|1), [0 n], and [1 n].
19 * 19 *
20 * The algorithm differs between strict/non-strict mode specyfing 20 * The algorithm differs between strict/non-strict mode specifying
21 * whether the pattern has to start at the first octect. Strict mode 21 * whether the pattern has to start at the first octet. Strict mode
22 * is enabled by default and can be disabled by inserting 22 * is enabled by default and can be disabled by inserting
23 * TS_FSM_HEAD_IGNORE as the first token in the chain. 23 * TS_FSM_HEAD_IGNORE as the first token in the chain.
24 * 24 *
@@ -44,7 +44,7 @@ struct ts_fsm
44#define _W 0x200 /* wildcard */ 44#define _W 0x200 /* wildcard */
45 45
46/* Map to _ctype flags and some magic numbers */ 46/* Map to _ctype flags and some magic numbers */
47static u16 token_map[TS_FSM_TYPE_MAX+1] = { 47static const u16 token_map[TS_FSM_TYPE_MAX+1] = {
48 [TS_FSM_SPECIFIC] = 0, 48 [TS_FSM_SPECIFIC] = 0,
49 [TS_FSM_WILDCARD] = _W, 49 [TS_FSM_WILDCARD] = _W,
50 [TS_FSM_CNTRL] = _C, 50 [TS_FSM_CNTRL] = _C,
@@ -61,7 +61,7 @@ static u16 token_map[TS_FSM_TYPE_MAX+1] = {
61 [TS_FSM_ASCII] = _A, 61 [TS_FSM_ASCII] = _A,
62}; 62};
63 63
64static u16 token_lookup_tbl[256] = { 64static const u16 token_lookup_tbl[256] = {
65_W|_A|_C, _W|_A|_C, _W|_A|_C, _W|_A|_C, /* 0- 3 */ 65_W|_A|_C, _W|_A|_C, _W|_A|_C, _W|_A|_C, /* 0- 3 */
66_W|_A|_C, _W|_A|_C, _W|_A|_C, _W|_A|_C, /* 4- 7 */ 66_W|_A|_C, _W|_A|_C, _W|_A|_C, _W|_A|_C, /* 4- 7 */
67_W|_A|_C, _W|_A|_C|_S, _W|_A|_C|_S, _W|_A|_C|_S, /* 8- 11 */ 67_W|_A|_C, _W|_A|_C|_S, _W|_A|_C|_S, _W|_A|_C|_S, /* 8- 11 */