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
invert = 0;
ignorelist_set_invert(ignorelist, invert);
} else {
- return (-1);
+ return -1;
}
- return (0);
+ return 0;
}
static void irq_submit(const char *irq_name, derive_t value) {
*/
fh = fopen("/proc/interrupts", "r");
if (fh == NULL) {
- char errbuf[1024];
- ERROR("irq plugin: fopen (/proc/interrupts): %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
- return (-1);
+ ERROR("irq plugin: fopen (/proc/interrupts): %s", STRERRNO);
+ return -1;
}
/* Get CPU count from the first line */
ERROR("irq plugin: unable to get CPU count from first line "
"of /proc/interrupts");
fclose(fh);
- return (-1);
+ return -1;
}
while (fgets(buffer, sizeof(buffer), fh) != NULL) {
fclose(fh);
- return (0);
+ return 0;
} /* int irq_read */
void module_register(void) {