X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Firq.c;h=eeea058a46e1f3bff32736e821fc9b36ac951374;hb=711f5b6c86f51061c21bedcaa46214a01de0125c;hp=d54041595f1693e7409732e448a2bf1f2988374f;hpb=9655d4a6d9fa2c4f02032759b831e93933d68bd9;p=collectd.git diff --git a/src/irq.c b/src/irq.c index d5404159..eeea058a 100644 --- a/src/irq.c +++ b/src/irq.c @@ -37,7 +37,7 @@ static const char *config_keys[] = {"Irq", "IgnoreSelected"}; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); -static ignorelist_t *ignorelist = NULL; +static ignorelist_t *ignorelist; /* * Private functions @@ -90,9 +90,7 @@ static int irq_read(void) { */ fh = fopen("/proc/interrupts", "r"); if (fh == NULL) { - char errbuf[1024]; - ERROR("irq plugin: fopen (/proc/interrupts): %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("irq plugin: fopen (/proc/interrupts): %s", STRERRNO); return -1; } @@ -140,7 +138,7 @@ static int irq_read(void) { if (irq_name_len == 4 && (strncmp(irq_name, "FIQ:", 4) == 0)) continue; - irq_name[irq_name_len - 1] = 0; + irq_name[irq_name_len - 1] = '\0'; irq_name_len--; irq_value = 0;