Fix compile time issues
[collectd.git] / src / conntrack.c
index 8a9200d..7b61eef 100644 (file)
@@ -23,8 +23,8 @@
 
 #include "collectd.h"
 
-#include "common.h"
 #include "plugin.h"
+#include "utils/common/common.h"
 
 #if !KERNEL_LINUX
 #error "No applicable input method."
@@ -41,7 +41,7 @@ static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
     Each table/chain combo that will be queried goes into this list
 */
 
-static int old_files = 0;
+static int old_files;
 
 static int conntrack_config(const char *key, const char *value) {
   if (strcmp(key, "OldFiles") == 0)
@@ -70,13 +70,13 @@ static int conntrack_read(void) {
   char const *path = old_files ? CONNTRACK_FILE_OLD : CONNTRACK_FILE;
   if (parse_value_file(path, &conntrack, DS_TYPE_GAUGE) != 0) {
     ERROR("conntrack plugin: Reading \"%s\" failed.", path);
-    return (-1);
+    return -1;
   }
 
   path = old_files ? CONNTRACK_MAX_FILE_OLD : CONNTRACK_MAX_FILE;
   if (parse_value_file(path, &conntrack_max, DS_TYPE_GAUGE) != 0) {
     ERROR("conntrack plugin: Reading \"%s\" failed.", path);
-    return (-1);
+    return -1;
   }
 
   conntrack_pct.gauge = (conntrack.gauge / conntrack_max.gauge) * 100;
@@ -85,7 +85,7 @@ static int conntrack_read(void) {
   conntrack_submit("conntrack", "max", conntrack_max);
   conntrack_submit("percent", "used", conntrack_pct);
 
-  return (0);
+  return 0;
 } /* static int conntrack_read */
 
 void module_register(void) {