Fix possible errors while building kernel module

This commit is contained in:
Vadim Vetrov 2024-12-09 01:34:31 +03:00
parent e8bdd05839
commit ba0f87d195
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5

View File

@ -514,7 +514,9 @@ void z_function(const char *str, int *zbuf, size_t len) {
for (int i = 1; i < (int)len; i++) {
zbuf[i] = 0;
if (i < rh) {
zbuf[i] = min(zbuf[i - lh], rh - i);
zbuf[i] = zbuf[i - lh];
if (rh - i < zbuf[i])
zbuf[i] = rh - i;
}
while (i + zbuf[i] < len && str[zbuf[i]] == str[i + zbuf[i]])