---
toys/android/start.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From ad7c5566ec12ca8f03a3d46bd6ada1f4a2036b81 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Mon, 27 Jun 2016 14:51:18 -0700
Subject: [PATCH] Fix iteration for start/stop without arguments.
---
toys/android/start.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/toys/android/start.c b/toys/android/start.c
index 1f358e9..20fa2b9 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)
--
2.8.0.rc3.226.g39d4020
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net