From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8802D138330 for ; Tue, 11 Oct 2016 15:31:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ADCA0E0C85; Tue, 11 Oct 2016 15:31:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 91B22E0C85 for ; Tue, 11 Oct 2016 15:31:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 20C28341648 for ; Tue, 11 Oct 2016 15:31:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 631A72F2 for ; Tue, 11 Oct 2016 15:31:12 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1476199802.78146b0e14cb57dda8a3aed3d4f8d6b1db7a3c7e.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/do_service.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 78146b0e14cb57dda8a3aed3d4f8d6b1db7a3c7e X-VCS-Branch: master Date: Tue, 11 Oct 2016 15:31:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0e1bf2d9-87f3-4b71-9674-468406b1c878 X-Archives-Hash: 53590c59b58f065310647cd0aeb20a4e commit: 78146b0e14cb57dda8a3aed3d4f8d6b1db7a3c7e Author: Sven Wegener gentoo org> AuthorDate: Tue Oct 4 09:30:02 2016 +0000 Commit: William Hubbs gentoo 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]);