git: 5e46ebc5d0a4 - stable/13 - daemon: make log_reopen variable a bool
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Mar 2023 21:01:30 UTC
The branch stable/13 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=5e46ebc5d0a4351145338f259d8dbf1fd4210756
commit 5e46ebc5d0a4351145338f259d8dbf1fd4210756
Author: Ihor Antonov <ihor@antonovs.family>
AuthorDate: 2023-03-02 03:00:42 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
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);