Replace all calls to `strerror' with `sstrerror'
[collectd.git] / src / serial.c
index 0cfa382..9fb26df 100644 (file)
@@ -80,7 +80,9 @@ static int serial_read (void)
        if ((fh = fopen ("/proc/tty/driver/serial", "r")) == NULL &&
                (fh = fopen ("/proc/tty/driver/ttyS", "r")) == NULL)
        {
-               WARNING ("serial: fopen: %s", strerror (errno));
+               char errbuf[1024];
+               WARNING ("serial: fopen: %s",
+                               sstrerror (errno, errbuf, sizeof (errbuf)));
                return (-1);
        }