aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/android/start.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/android/start.c b/toys/android/start.c
index 1f358e90..20fa2b9e 100644
--- a/toys/android/start.c
+++ b/toys/android/start.c
@@ -40,9 +40,9 @@ static void start_stop(int start)
if (getuid()) error_exit("must be root");
if (!*ss) {
- // Iterate through optargs, or services forward/backward.
+ // If we don't have optargs, iterate through services forward/backward.
ss = services+1;
- if (!start) ss += ARRAY_LEN(services)-1, direction = -1;
+ if (!start) ss = services+ARRAY_LEN(services)-2, direction = -1;
}
for (; *ss; ss += direction)