Treewide: use bool instead of _Bool
[collectd.git] / src / serial.c
index 5057fd3..1b587ca 100644 (file)
@@ -52,15 +52,14 @@ static int serial_read(void) {
   /* there are a variety of names for the serial device */
   if ((fh = fopen("/proc/tty/driver/serial", "r")) == NULL &&
       (fh = fopen("/proc/tty/driver/ttyS", "r")) == NULL) {
-    char errbuf[1024];
-    WARNING("serial: fopen: %s", sstrerror(errno, errbuf, sizeof(errbuf)));
-    return (-1);
+    WARNING("serial: fopen: %s", STRERRNO);
+    return -1;
   }
 
   while (fgets(buffer, sizeof(buffer), fh) != NULL) {
     derive_t rx = 0;
     derive_t tx = 0;
-    _Bool have_rx = 0, have_tx = 0;
+    bool have_rx = 0, have_tx = 0;
     size_t len;
 
     char *fields[16];
@@ -100,7 +99,7 @@ static int serial_read(void) {
   }
 
   fclose(fh);
-  return (0);
+  return 0;
 } /* int serial_read */
 
 void module_register(void) {