#error "No applicable input method."
#endif
-static _Bool values_absolute = 1;
-static _Bool values_percentage = 0;
+static bool values_absolute = 1;
+static bool values_percentage;
static int memory_config(oconfig_item_t *ci) /* {{{ */
{
char *fields[8];
int numfields;
- _Bool detailed_slab_info = 0;
+ bool detailed_slab_info = 0;
gauge_t mem_total = 0;
gauge_t mem_used = 0;
gauge_t mem_slab_unreclaimable = 0;
if ((fh = fopen("/proc/meminfo", "r")) == NULL) {
- char errbuf[1024];
- WARNING("memory: fopen: %s", sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("memory: fopen: %s", STRERRNO);
return -1;
}
}
if (fclose(fh)) {
- char errbuf[1024];
- WARNING("memory: fclose: %s", sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("memory: fclose: %s", STRERRNO);
}
if (mem_total < (mem_free + mem_buffered + mem_cached + mem_slab_total))
size = sizeof(vmtotal);
if (sysctl(mib, 2, &vmtotal, &size, NULL, 0) < 0) {
- char errbuf[1024];
- WARNING("memory plugin: sysctl failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("memory plugin: sysctl failed: %s", STRERRNO);
return -1;
}
perfstat_memory_total_t pmemory = {0};
if (perfstat_memory_total(NULL, &pmemory, sizeof(pmemory), 1) < 0) {
- char errbuf[1024];
- WARNING("memory plugin: perfstat_memory_total failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("memory plugin: perfstat_memory_total failed: %s", STRERRNO);
return -1;
}