[04/11] misc: syslog: Use bool for connected

Message ID 20210412211113.393120-4-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • [01/11] support: Add xmkfifo
Related show

Commit Message

H.J. Lu via Libc-alpha April 12, 2021, 9:11 p.m.
Checked on x86_64-linux-gnu.
---
 misc/syslog.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.27.0

Comments

Andreas Schwab April 14, 2021, 2:54 p.m. | #1
Ok.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Patch

diff --git a/misc/syslog.c b/misc/syslog.c
index 2ec986811d..668b4c852b 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -58,7 +58,7 @@ 
 
 static int LogType = SOCK_DGRAM;        /* Type of socket connection  */
 static int LogFile = -1;                /* fd for log  */
-static int connected;                   /* Have done connect */
+static bool connected;                  /* Have done connect */
 static int LogStat;                     /* Status bits, set by openlog()  */
 static const char *LogTag;              /* String to tag the entry with  */
 static int LogFacility = LOG_USER;      /* Default facility code  */
@@ -374,7 +374,7 @@  openlog_internal (const char *ident, int logstat, int logfac)
                 }
             }
           else
-            connected = 1;
+            connected = true;
         }
       break;
     }
@@ -408,7 +408,7 @@  closelog_internal (void)
 
   __close (LogFile);
   LogFile = -1;
-  connected = 0;
+  connected = false;
 }
 
 void