aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alconfig.c
diff options
context:
space:
mode:
authorFilip Gawin <[email protected]>2018-10-29 02:05:45 +0100
committerFilip Gawin <[email protected]>2018-10-29 13:38:58 +0100
commit08226bc6b0147b69a1afb74d83c6a8821e93601b (patch)
treefd39c1d42c21eb751b1aa9696d7c758f6fc7d4de /Alc/alconfig.c
parent56b8b976427175731b205262f11b420581e24efd (diff)
Simplify some statements
Diffstat (limited to 'Alc/alconfig.c')
-rw-r--r--Alc/alconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/alconfig.c b/Alc/alconfig.c
index 3d0ed140..050391af 100644
--- a/Alc/alconfig.c
+++ b/Alc/alconfig.c
@@ -635,7 +635,7 @@ const char *GetConfigValue(const char *devName, const char *blockName, const cha
int ConfigValueExists(const char *devName, const char *blockName, const char *keyName)
{
const char *val = GetConfigValue(devName, blockName, keyName, "");
- return !!val[0];
+ return val[0] != 0;
}
int ConfigValueStr(const char *devName, const char *blockName, const char *keyName, const char **ret)
@@ -692,7 +692,7 @@ int GetConfigValueBool(const char *devName, const char *blockName, const char *k
{
const char *val = GetConfigValue(devName, blockName, keyName, "");
- if(!val[0]) return !!def;
+ if(!val[0]) return def != 0;
return (strcasecmp(val, "true") == 0 || strcasecmp(val, "yes") == 0 ||
strcasecmp(val, "on") == 0 || atoi(val) != 0);
}