diff options
author | Chris Robinson <[email protected]> | 2010-05-12 07:30:45 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-05-12 07:30:45 -0700 |
commit | 61b682131e4fa03197207eadb5751619e477c228 (patch) | |
tree | b0fd9744e0d5cdd5ce6d630c461ce74104e345cf | |
parent | a53e3dda75f329f6f2060e8e760a1a4f7edbe45a (diff) |
Reduce some indentation
-rw-r--r-- | Alc/alcConfig.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Alc/alcConfig.c b/Alc/alcConfig.c index 4c523886..847e5d13 100644 --- a/Alc/alcConfig.c +++ b/Alc/alcConfig.c @@ -277,24 +277,24 @@ const char *GetConfigValue(const char *blockName, const char *keyName, const cha { size_t i, j; - if(keyName) + if(!keyName) + return def; + + if(!blockName) + blockName = "general"; + + for(i = 0;i < cfgCount;i++) { - if(!blockName) - blockName = "general"; + if(strcasecmp(cfgBlocks[i].name, blockName) != 0) + continue; - for(i = 0;i < cfgCount;i++) + for(j = 0;j < cfgBlocks[i].entryCount;j++) { - if(strcasecmp(cfgBlocks[i].name, blockName) != 0) - continue; - - for(j = 0;j < cfgBlocks[i].entryCount;j++) + if(strcasecmp(cfgBlocks[i].entries[j].key, keyName) == 0) { - if(strcasecmp(cfgBlocks[i].entries[j].key, keyName) == 0) - { - if(cfgBlocks[i].entries[j].value[0]) - return cfgBlocks[i].entries[j].value; - return def; - } + if(cfgBlocks[i].entries[j].value[0]) + return cfgBlocks[i].entries[j].value; + return def; } } } |