From 96242df22866982421af1ab3260d815f5dd004ab Mon Sep 17 00:00:00 2001 From: Jprimero15 Date: Sun, 24 Mar 2024 15:04:57 +0800 Subject: [PATCH] kernel: make for loop compatible (#1517) --- kernel/throne_tracker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/throne_tracker.c b/kernel/throne_tracker.c index 2429c6ac7b61..aa36c926ff71 100644 --- a/kernel/throne_tracker.c +++ b/kernel/throne_tracker.c @@ -34,7 +34,8 @@ static int get_pkg_from_apk_path(char *pkg, const char *path) const char *last_slash = NULL; const char *second_last_slash = NULL; - for (int i = len - 1; i >= 0; i--) { + int i; + for (i = len - 1; i >= 0; i--) { if (path[i] == '/') { if (!last_slash) { last_slash = &path[i];