From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2D088138CC5 for ; Wed, 25 Mar 2015 00:36:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C433FE07E1; Wed, 25 Mar 2015 00:36:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 73F0CE07E1 for ; Wed, 25 Mar 2015 00:36:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3F0AA340A6F for ; Wed, 25 Mar 2015 00:36:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 781AC14780 for ; Wed, 25 Mar 2015 00:36:33 +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: <1427242109.f085ae400c60289f61d99e9e80ce037beedf38b4.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/librc/, src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/librc/librc-daemon.c src/rc/rc.c X-VCS-Directories: src/librc/ src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: f085ae400c60289f61d99e9e80ce037beedf38b4 X-VCS-Branch: master Date: Wed, 25 Mar 2015 00:36:33 +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: 114c3ebc-8252-48a5-9738-7b62977b9cf1 X-Archives-Hash: a062ce6f36532aa46afe321cc187ca71 commit: f085ae400c60289f61d99e9e80ce037beedf38b4 Author: Doug Freed mtu edu> AuthorDate: Tue Mar 24 19:28:47 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Mar 25 00:08:29 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=f085ae40 Fix some compiler warnings librc: Fix C90 warning (mixed declaration and code) rc: Fix warning about discarding const qualifier Fixes #45. src/librc/librc-daemon.c | 6 ++++-- src/rc/rc.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c index 76fdd7b..3811a04 100644 --- a/src/librc/librc-daemon.c +++ b/src/librc/librc-daemon.c @@ -510,6 +510,8 @@ rc_service_daemons_crashed(const char *service) RC_STRINGLIST *list = NULL; RC_STRING *s; size_t i; + char *ch_root; + char *spidfile; path += snprintf(dirpath, sizeof(dirpath), RC_SVCDIR "/daemons/%s", basename_c(service)); @@ -554,8 +556,8 @@ rc_service_daemons_crashed(const char *service) } fclose(fp); - char *ch_root = rc_service_value_get(basename_c(service), "chroot"); - char *spidfile = pidfile; + ch_root = rc_service_value_get(basename_c(service), "chroot"); + spidfile = pidfile; if (ch_root && pidfile) { spidfile = xmalloc(strlen(ch_root) + strlen(pidfile) + 1); strcpy(spidfile, ch_root); diff --git a/src/rc/rc.c b/src/rc/rc.c index e3301c6..dd35482 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -519,7 +519,7 @@ runlevel_config(const char *service, const char *level) } static void -do_stop_services(const RC_STRINGLIST *types_n, const RC_STRINGLIST *start_services, +do_stop_services(RC_STRINGLIST *types_n, RC_STRINGLIST *start_services, const RC_STRINGLIST *stop_services, const RC_DEPTREE *deptree, const char *newlevel, bool parallel, bool going_down) {