Various plugins: Use the IS_TRUE and IS_FALSE macros everywhere.
[collectd.git] / src / collectd.c
index 17905c7..bc69a3b 100644 (file)
@@ -47,7 +47,7 @@ kstat_ctl_t *kc;
 
 static int loop = 0;
 
-static void *do_flush (void *arg)
+static void *do_flush (void __attribute__((unused)) *arg)
 {
        INFO ("Flushing all data.");
        plugin_flush (NULL, -1, NULL);
@@ -56,17 +56,17 @@ static void *do_flush (void *arg)
        return NULL;
 }
 
-static void sig_int_handler (int signal)
+static void sig_int_handler (int __attribute__((unused)) signal)
 {
        loop++;
 }
 
-static void sig_term_handler (int signal)
+static void sig_term_handler (int __attribute__((unused)) signal)
 {
        loop++;
 }
 
-static void sig_usr1_handler (int signal)
+static void sig_usr1_handler (int __attribute__((unused)) signal)
 {
        pthread_t      thread;
        pthread_attr_t attr;
@@ -102,9 +102,7 @@ static int init_hostname (void)
        }
 
        str = global_option_get ("FQDNLookup");
-       if ((strcasecmp ("false", str) == 0)
-                       || (strcasecmp ("no", str) == 0)
-                       || (strcasecmp ("off", str) == 0))
+       if (IS_FALSE (str))
                return (0);
 
        memset (&ai_hints, '\0', sizeof (ai_hints));