Code

Replace all calls to `strerror' with `sstrerror'
[collectd.git] / src / irq.c
index d44ac0b3a53373c4f994398cfa05000b7091f0ff..e39d0a5721d3bbdef2cbd4e6a9eafcc9d6c05ce9 100644 (file)
--- a/src/irq.c
+++ b/src/irq.c
@@ -178,8 +178,9 @@ static int irq_read (void)
 
        if ((fh = fopen ("/proc/interrupts", "r")) == NULL)
        {
+               char errbuf[1024];
                WARNING ("irq plugin: fopen (/proc/interrupts): %s",
-                               strerror (errno));
+                               sstrerror (errno, errbuf, sizeof (errbuf)));
                return (-1);
        }
        while (fgets (buffer, BUFSIZE, fh) != NULL)