Don't initialize static numeric variables to 0
[collectd.git] / src / snmp.c
index 923a5c4..433f5f8 100644 (file)
@@ -115,7 +115,7 @@ typedef struct csnmp_table_values_s csnmp_table_values_t;
 /*
  * Private variables
  */
-static data_definition_t *data_head = NULL;
+static data_definition_t *data_head;
 
 /*
  * Prototypes
@@ -219,7 +219,7 @@ static void csnmp_host_definition_destroy(void *arg) /* {{{ */
  *      +-> csnmp_config_add_host_security_level
  */
 static void call_snmp_init_once(void) {
-  static int have_init = 0;
+  static int have_init;
 
   if (have_init == 0)
     init_snmp(PACKAGE_NAME);
@@ -399,8 +399,7 @@ static int csnmp_config_add_data(oconfig_item_t *ci) {
 
   DEBUG("snmp plugin: dd = { name = %s, type = %s, is_table = %s, values_len = "
         "%" PRIsz " }",
-        dd->name, dd->type, (dd->is_table != 0) ? "true" : "false",
-        dd->values_len);
+        dd->name, dd->type, (dd->is_table) ? "true" : "false", dd->values_len);
 
   if (data_head == NULL)
     data_head = dd;