summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Anderson <brad@cloudant.com>2010-08-05 13:41:53 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-12 02:25:40 -0400
commite660dd48e78f1a368010bbcf4455b576dd59d7c1 (patch)
treecfe2fb68f838d271e2206e1b96f1264a9e69bf09 /src
parent0ce0b7588e7a28c490c40491d561d7d9464eb7c5 (diff)
n_val tests for mem3_util
Diffstat (limited to 'src')
-rw-r--r--src/mem3_util.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mem3_util.erl b/src/mem3_util.erl
index f6fad76a..2ed84db6 100644
--- a/src/mem3_util.erl
+++ b/src/mem3_util.erl
@@ -115,6 +115,8 @@ n_val(N, NodeCount) when is_list(N) ->
n_val(N, NodeCount) when is_integer(NodeCount), N > NodeCount ->
?LOG_ERROR("Request to create N=~p DB but only ~p node(s)", [N, NodeCount]),
NodeCount;
+n_val(N, _) when N < 1 ->
+ 1;
n_val(N, _) ->
N.