commit:     78146b0e14cb57dda8a3aed3d4f8d6b1db7a3c7e
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 09:30:02 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 15:30:02 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=78146b0e

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 3c39d35..a36a09c 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]);

Reply via email to