Various plugins: Use the IS_TRUE and IS_FALSE macros everywhere.
[collectd.git] / src / hddtemp.c
index cc67c63..4e08375 100644 (file)
@@ -1,6 +1,8 @@
 /**
  * collectd - src/hddtemp.c
  * Copyright (C) 2005,2006  Vincent StehlĂ©
+ * Copyright (C) 2006,2007  Florian octo Forster
+ * Copyright (C) 2008       Sebastian Harl
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -19,6 +21,7 @@
  * Authors:
  *   Vincent StehlĂ© <vincent.stehle at free.fr>
  *   Florian octo Forster <octo at verplant.org>
+ *   Sebastian Harl <sh at tokkee.org>
  *
  * TODO:
  *   Do a pass, some day, and spare some memory. We consume too much for now
@@ -230,9 +233,7 @@ static int hddtemp_config (const char *key, const char *value)
        }
        else if (strcasecmp (key, "TranslateDevicename") == 0)
        {
-               if ((strcasecmp ("true", value) == 0)
-                               || (strcasecmp ("yes", value) == 0)
-                               || (strcasecmp ("on", value) == 0))
+               if (IS_TRUE (value))
                        translate_devicename = 1;
                else
                        translate_devicename = 0;