From 78146b0e14cb57dda8a3aed3d4f8d6b1db7a3c7e Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Tue, 4 Oct 2016 11:30:02 +0200 Subject: [PATCH] do_service: Initialize idx to 0 If index is not explicitly specified for service_started_daemon, it will look for daemons by random index. This fixes #100. --- src/rc/do_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rc/do_service.c b/src/rc/do_service.c index 3c39d35f..a36a09ca 100644 --- a/src/rc/do_service.c +++ b/src/rc/do_service.c @@ -36,7 +36,7 @@ int main(int argc, char **argv) bool ok = false; char *service; char *exec; - int idx; + int idx = 0; RC_SERVICE state, bit; applet = basename_c(argv[0]);