diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alconfig.c | 4 | ||||
-rw-r--r-- | Alc/helpers.c | 2 | ||||
-rw-r--r-- | Alc/panning.c | 2 |
3 files changed, 4 insertions, 4 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); } diff --git a/Alc/helpers.c b/Alc/helpers.c index d2cb6253..0d5087e6 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -842,7 +842,7 @@ static void DirectorySearch(const char *path, const char *ext, vector_al_string continue; len = strlen(dirent->d_name); - if(!(len > extlen)) + if(len <= extlen) continue; if(strcasecmp(dirent->d_name+len-extlen, ext) != 0) continue; diff --git a/Alc/panning.c b/Alc/panning.c index 2c0f3bf2..79627e78 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -730,7 +730,7 @@ static void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALsiz ); bformatdec_reset(device->AmbiDecoder, conf, count, device->Frequency, speakermap); - if(!(conf->ChanMask > 0xf)) + if(conf->ChanMask <= 0xf) { device->FOAOut.Ambi = device->Dry.Ambi; device->FOAOut.CoeffCount = device->Dry.CoeffCount; |