From nobody Fri Mar 17 21:01:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pdc4W1dz6z3yqcd; Fri, 17 Mar 2023 21:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pdc4W0l0Kz3q8H; Fri, 17 Mar 2023 21:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679086891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZiXzBnoeZbHOrU60uThA+X+42i27pkkiTBqpWfxOy1k=; b=YRLVzPeaSh8UK8ezN0hylFeuF2D7OdCCHqiRexOV1ugVhWorvXc5RpqOD0QPEbXZuD/CMR wWmLbaH9z8qRoRA1F91kDzjd59sE+I1t4jQqy/7Fj8Qfdi2vp7BboELwnhHyxENV9lAVLn r8MfukeiKClgpIque3RuFLI8am1jdAqyiM8A5BjFbjbjEPlfguJwda7/pGieZNaJL+jkZ/ OSfW8ENP/L6vVvP2BaEknINu+bVY8k//n6ZMwkL6AduuA5Bt7Vw80JoUaE2aSpj7pk5IJQ Os728vX7EUm+zWeX4wCzfd583Df/cIaE0FYnAFs+hFO+PshjRuZIUDAhhLKfBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679086891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZiXzBnoeZbHOrU60uThA+X+42i27pkkiTBqpWfxOy1k=; b=UmAmyUdEYJ9lwvOxTDbehxDPjpdM24x9dAkweGeICaAlovrAez1nsfZu7ELMK8i03pjxrA WAsLwwj5HVN343t99dpmH7OWulR+o48T3nAUPFhr3AtZzy4jsDFohE45cJ+o+RvPCMCjyT 4WCok23tHBVIFlcoIyV2hhk/RARDioUo6v9/iYJpx2V82qLLIsMKJbdlHVswY8n5qCObk4 fBpW8thinEzafufS7zMGpA5mMuUr5/7M2Gf4mP+o/H6gJ0VBJ0b7YPBmOmP4mMZNLYGgSs qPGG3IEhBqUqjfl1CHwkGr4w7HSrClopSFGdqetg6EBIEHJVxVleg0TXqFpXpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679086891; a=rsa-sha256; cv=none; b=PpbMXL3El6WFF5zyCT7SojEfjfYXPojP+YhhK/vVHjJELSzA+SqI/D+xZ3snNYF9wxUdeg BSxwIEcpRp6x9v00eAdVbQvp0iLqrmRj/1SS8RoMVYgFM0ipWuivRSHN3tIBhDcuIXUjO8 E7hDTaOA4vSMlBWKX1mr1ShtDco+1sYpD75+DH/BBIv3ADoQSNiW0UKCeaksSYnjK50EjI JRTNFr8v9TvChPtoCcz3qgUQBj/zvYHLe1jVbHAkl8DgpnGiJsKDeu3rwxZdrGj8fEuuNX /j96PRpudMEsf+nipDHFFukbyMWUcFZXDh/P7zdqWGph9HG1WNaxrR7IJ4aYnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pdc4V6y94zgbS; Fri, 17 Mar 2023 21:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32HL1UfD015099; Fri, 17 Mar 2023 21:01:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32HL1UiI015098; Fri, 17 Mar 2023 21:01:30 GMT (envelope-from git) Date: Fri, 17 Mar 2023 21:01:30 GMT Message-Id: <202303172101.32HL1UiI015098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 5e46ebc5d0a4 - stable/13 - daemon: make log_reopen variable a bool List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5e46ebc5d0a4351145338f259d8dbf1fd4210756 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5e46ebc5d0a4351145338f259d8dbf1fd4210756 commit 5e46ebc5d0a4351145338f259d8dbf1fd4210756 Author: Ihor Antonov AuthorDate: 2023-03-02 03:00:42 +0000 Commit: Kyle Evans CommitDate: 2023-03-17 21:01:02 +0000 daemon: make log_reopen variable a bool Following style(9) and C99 recommendation use bool instead of int for boolean operations. Reviewed by: kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/669 (cherry picked from commit 97022e90c3693ad1180bd26ebc909ce27893b227) --- usr.sbin/daemon/daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 344b914d464b..2db2594041e7 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -144,6 +144,7 @@ main(int argc, char *argv[]) { bool supervision_enabled = false; bool syslog_enabled = false; + bool log_reopen = false; char *p = NULL; const char *pidfile = NULL; const char *logtag = "daemon"; @@ -153,7 +154,6 @@ main(int argc, char *argv[]) const char *user = NULL; int ch = 0; int child_eof = 0; - int log_reopen = 0; int logfac = LOG_DAEMON; int logpri = LOG_NOTICE; int nochdir = 1; @@ -184,7 +184,7 @@ main(int argc, char *argv[]) noclose = 0; break; case 'H': - log_reopen = 1; + log_reopen = true; break; case 'l': logfac = get_log_mapping(optarg, facilitynames);