diff options
author | Elliott Hughes <enh@google.com> | 2016-06-27 14:51:18 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-06-28 03:00:05 -0500 |
commit | 3325b3e9b0328ecdebe6cce913766c306721f334 (patch) | |
tree | e1b87ddd80b3b1bb94d94166461a44673c859222 /toys/android | |
parent | 63cbc6824da4f6b434e4aad9e63aa32a9a9a489d (diff) | |
download | toybox-3325b3e9b0328ecdebe6cce913766c306721f334.tar.gz |
Fix iteration for start/stop without arguments.
Diffstat (limited to 'toys/android')
-rw-r--r-- | toys/android/start.c | 4 |
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) |