Merge remote-tracking branch 'origin/collectd-5.8'
[collectd.git] / src / vmem.c
index cd9e7d2..95cfbaf 100644 (file)
@@ -79,10 +79,10 @@ static int vmem_config(const char *key, const char *value) {
     else
       verbose_output = 0;
   } else {
-    return (-1);
+    return -1;
   }
 
-  return (0);
+  return 0;
 } /* int vmem_config */
 
 static int vmem_read(void) {
@@ -104,10 +104,8 @@ static int vmem_read(void) {
 
   fh = fopen("/proc/vmstat", "r");
   if (fh == NULL) {
-    char errbuf[1024];
-    ERROR("vmem plugin: fopen (/proc/vmstat) failed: %s",
-          sstrerror(errno, errbuf, sizeof(errbuf)));
-    return (-1);
+    ERROR("vmem plugin: fopen (/proc/vmstat) failed: %s", STRERRNO);
+    return -1;
   }
 
   while (fgets(buffer, sizeof(buffer), fh) != NULL) {
@@ -253,12 +251,10 @@ static int vmem_read(void) {
     submit_two(NULL, "vmpage_io", "swap", pswpin, pswpout);
 #endif /* KERNEL_LINUX */
 
-  return (0);
+  return 0;
 } /* int vmem_read */
 
 void module_register(void) {
   plugin_register_config("vmem", vmem_config, config_keys, config_keys_num);
   plugin_register_read("vmem", vmem_read);
 } /* void module_register */
-
-/* vim: set sw=2 sts=2 ts=8 : */