diff options
Diffstat (limited to 'lib/ts_fsm.c')
| -rw-r--r-- | lib/ts_fsm.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c index 5696a35184e4..053615f4fcd7 100644 --- a/lib/ts_fsm.c +++ b/lib/ts_fsm.c @@ -1,17 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * lib/ts_fsm.c A naive finite state machine text search approach * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * * Authors: Thomas Graf <tgraf@suug.ch> * * ========================================================================== * * A finite state machine consists of n states (struct ts_fsm_token) - * representing the pattern as a finite automation. The data is read + * representing the pattern as a finite automaton. The data is read * sequentially on an octet basis. Every state token specifies the number * of recurrences and the type of value accepted which can be either a * specific character or ctype based set of characters. The available @@ -36,7 +32,7 @@ struct ts_fsm { unsigned int ntokens; - struct ts_fsm_token tokens[0]; + struct ts_fsm_token tokens[]; }; /* other values derived from ctype.h */ @@ -197,7 +193,7 @@ startover: TOKEN_MISMATCH(); block_idx++; - /* fall through */ + fallthrough; case TS_FSM_ANY: if (next == NULL) @@ -335,6 +331,7 @@ static void __exit exit_fsm(void) textsearch_unregister(&fsm_ops); } +MODULE_DESCRIPTION("naive finite state machine text search"); MODULE_LICENSE("GPL"); module_init(init_fsm); |
