Skip to content

Commit a3b7a9b

Browse files
pershootaaaaaaaa-815
authored andcommitted
fix 'for' loop problem (tiann/KernelSU#2745) (KernelSU-Next#772)
fix ‘for’ loop initial declarations are only allowed in c99 or c11 mode Co-authored-by: nobody202222 <[email protected]>
1 parent 12d4694 commit a3b7a9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/sucompat.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ void ksu_sucompat_init()
329329
void ksu_sucompat_exit()
330330
{
331331
#ifdef CONFIG_KSU_KPROBES_HOOK
332-
for (int i = 0; i < ARRAY_SIZE(su_kps); i++) {
332+
int i;
333+
for (i = 0; i < ARRAY_SIZE(su_kps); i++) {
333334
destroy_kprobe(&su_kps[i]);
334335
}
335336
#else

0 commit comments

Comments
 (0)