summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_config.erl
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-09-05 20:37:45 +0000
committerJan Lehnardt <jan@apache.org>2009-09-05 20:37:45 +0000
commitaa5daeca5c54432e6b985508fadcd3d85cc5388d (patch)
tree97efa66d0b6def22a30f86df8265595b3c16cef9 /src/couchdb/couch_config.erl
parenta41b4818cc496f07a07c324a8a1f7c82fbf0317a (diff)
code =~ s/imperative/declarative & faster/, thanks to Kostis Sagonas for pointing these out, more to come
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@811709 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_config.erl')
-rw-r--r--src/couchdb/couch_config.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_config.erl b/src/couchdb/couch_config.erl
index 1e9ae41f..69d0ac93 100644
--- a/src/couchdb/couch_config.erl
+++ b/src/couchdb/couch_config.erl
@@ -94,8 +94,8 @@ init(IniFiles) ->
{ok, ParsedIniValues} = parse_ini_file(IniFile),
ets:insert(?MODULE, ParsedIniValues)
end, IniFiles),
- WriteFile = case length(IniFiles) > 0 of
- true -> lists:last(IniFiles);
+ WriteFile = case IniFiles of
+ [_|_] -> lists:last(IniFiles);
_ -> undefined
end,
{ok, #config{write_filename=WriteFile}}.