forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/lib/ts_bm.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * lib/ts_bm.c Boyer-Moore text search implementation
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version
7
- * 2 of the License, or (at your option) any later version.
84 *
95 * Authors: Pablo Neira Ayuso <pablo@eurodev.net>
106 *
....@@ -15,7 +11,7 @@
1511 * [1] A Fast String Searching Algorithm, R.S. Boyer and Moore.
1612 * Communications of the Association for Computing Machinery,
1713 * 20(10), 1977, pp. 762-772.
18
- * http://www.cs.utexas.edu/users/moore/publications/fstrpos.pdf
14
+ * https://www.cs.utexas.edu/users/moore/publications/fstrpos.pdf
1915 *
2016 * [2] Handbook of Exact String Matching Algorithms, Thierry Lecroq, 2004
2117 * http://www-igm.univ-mlv.fr/~lecroq/string/string.pdf
....@@ -56,7 +52,7 @@
5652 u8 * pattern;
5753 unsigned int patlen;
5854 unsigned int bad_shift[ASIZE];
59
- unsigned int good_shift[0];
55
+ unsigned int good_shift[];
6056 };
6157
6258 static unsigned int bm_find(struct ts_config *conf, struct ts_state *state)