summaryrefslogtreecommitdiff
path: root/src/libstrongswan/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/settings.c')
-rw-r--r--src/libstrongswan/settings.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/libstrongswan/settings.c b/src/libstrongswan/settings.c
index a02823ba0..64ac09299 100644
--- a/src/libstrongswan/settings.c
+++ b/src/libstrongswan/settings.c
@@ -11,12 +11,11 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
- *
- * $Id$
*/
#define _GNU_SOURCE
#include <string.h>
+#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
@@ -213,17 +212,17 @@ static bool get_bool(private_settings_t *this, char *key, bool def, ...)
va_end(args);
if (value)
{
- if (strcasecmp(value, "true") == 0 ||
- strcasecmp(value, "enabled") == 0 ||
- strcasecmp(value, "yes") == 0 ||
- strcasecmp(value, "1") == 0)
+ if (strcaseeq(value, "true") ||
+ strcaseeq(value, "enabled") ||
+ strcaseeq(value, "yes") ||
+ strcaseeq(value, "1"))
{
return TRUE;
}
- else if (strcasecmp(value, "false") == 0 ||
- strcasecmp(value, "disabled") == 0 ||
- strcasecmp(value, "no") == 0 ||
- strcasecmp(value, "0") == 0)
+ else if (strcaseeq(value, "false") ||
+ strcaseeq(value, "disabled") ||
+ strcaseeq(value, "no") ||
+ strcaseeq(value, "0"))
{
return FALSE;
}