diff options
author | Max Kellermann <max@duempel.org> | 2008-10-02 17:47:01 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-02 17:47:01 +0200 |
commit | 4522707accad358bd3098a6b1dd6966da5564610 (patch) | |
tree | f63dac0f6049fb8ef0d77ac0ffcc5a8013db820b /src/conf.c | |
parent | 93c2a816ea59500f2bd5b800a54dc8add796ae7d (diff) | |
download | mpd-4522707accad358bd3098a6b1dd6966da5564610.tar.gz mpd-4522707accad358bd3098a6b1dd6966da5564610.tar.xz mpd-4522707accad358bd3098a6b1dd6966da5564610.zip |
options: use stdbool
Use the standard "bool" type instead of glib's "gboolean". This way,
options.h doesn't have to include the fat glib.h.
Diffstat (limited to '')
-rw-r--r-- | src/conf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/conf.c b/src/conf.c index e0214ce9d..66f125d0d 100644 --- a/src/conf.c +++ b/src/conf.c @@ -83,13 +83,11 @@ typedef enum { KEY_PARSER_DONE } key_parser_state_t; -static gboolean +static bool str2bool(char *str) { - if (!strcasecmp(str, "yes") || !strcasecmp(str, "true") || - !strcasecmp(str, "on") || !strcasecmp(str, "1")) - return TRUE; - return FALSE; + return strcasecmp(str, "yes") == 0 || strcasecmp(str, "true") == 0 || + strcasecmp(str, "on") == 0 || strcasecmp(str, "1") == 0; } static int |