From nobody Thu Mar 02 03:01:06 2023 X-Original-To: dev-commits-src-main@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 4PRwpq1T1Pz3vk14; Thu, 2 Mar 2023 03:01:07 +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 4PRwpp6SGQz44SY; Thu, 2 Mar 2023 03:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677726067; 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=HXkf//7GPvMs/Xrfj09Bsn843RTNch0AS/5YEM5ieto=; b=PnyHZJ+DCYtQxrVY6SCf1Vq/zM/W5FzxQcCe7OhnAPEzy+XFxWhef/1fEvmIZOocEXkOVz UsSf8Wze8z5V99ia98v5b1p9X79ol8IPoTrdjoEpzXonRZI6lDTQ0kxH7PKzMyKxaFAdec ioaWIfQ2Gq+5O7Dae4k23K21U1zPY3jnmhdbmgsPq6HMfTbezH1Z4TuoLw/j/QGj4F4LYu nOrfQ2Qw/WnNVJKTHkYSCXT8ZKBqoeMrlGbgk50JNDkEP83uqroN8eUDg6MsJ9JcHxRZJi xrpjoTGstsGA2RGYK1MpQyzNV3VzucaKn1HiWGHlqit0DcCJF+NckFvAjZADNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677726067; 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=HXkf//7GPvMs/Xrfj09Bsn843RTNch0AS/5YEM5ieto=; b=hQgr//W99u0qWtFrYqBLhtBq4lreL7oFfDTzxZRw0tpnZ+pKmEeX/TsTeIHndAdrjVmWx4 csK5qzkdwbQL3OFjSXUybYLmc7JbxI45e4uHHGSnuYw3OBux/bszVz/KTW+jq08HxG5c0f rdfVo/EgaJjinmH49Zju/Dq2vOIzHlr2K91KMo3v7q6pJRRppFjSbbnlgYz2I8oSMPRWRA zAmLhT0N5OaxbnEoTmdWEvwEJXt+DYSOJkdxbiQGLoZ6kY1rnVgRXr2f5xZQJ6p1vz47re Tv6fmO3b+BVlqz7g1sX45pua/Q3rpZXvbn19ZWlPaDdPfdDFzZaUtXZ0gW73gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677726067; a=rsa-sha256; cv=none; b=BaTtWDW5BYxc0Kd8qbixLK0OSBG1XGWyCY4/QOo38ZPjqI5/c7mVO+GLe299N17+JSVNpv mx+zInw7x6mOoYialISDk70KWCzPnMC6OzY7lw8Pcf93BUZH9kDFgMg4fsyLXdWI9DBm06 N49c1kqT9wVOmP2ok8uADe5L4/3uw5Q76jRybY6GjNhGUmSwIGe+6Mrk9+VHnaG+lQjA24 tIQpq3a+9FT7avWI2Qdi5ZWkakxOupv2Vy00z2I1KfdJL4CxLwFufdijWEQsIgBQf4NtOt GfjDKCrQtp18j3Z8Zsu8DWfiweBA43CihpN1qDWGFtkkqL4I3CTKtxfjsVJedA== 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 4PRwpp4k3KzyvP; Thu, 2 Mar 2023 03:01:06 +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 322316nd034337; Thu, 2 Mar 2023 03:01:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 322316v1034336; Thu, 2 Mar 2023 03:01:06 GMT (envelope-from git) Date: Thu, 2 Mar 2023 03:01:06 GMT Message-Id: <202303020301.322316v1034336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 97022e90c369 - main - daemon: make log_reopen variable a bool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 97022e90c3693ad1180bd26ebc909ce27893b227 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=97022e90c3693ad1180bd26ebc909ce27893b227 commit 97022e90c3693ad1180bd26ebc909ce27893b227 Author: Ihor Antonov AuthorDate: 2023-03-02 03:00:42 +0000 Commit: Kyle Evans CommitDate: 2023-03-02 03:00:42 +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 --- 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);