couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/3] config commit: updated refs/heads/master to b2ecd0d
Date Wed, 09 Sep 2015 17:48:51 GMT
Repository: couchdb-config
Updated Branches:
  refs/heads/master b92ba5a19 -> b2ecd0d47


Fix to_integer and to_float


Project: http://git-wip-us.apache.org/repos/asf/couchdb-config/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-config/commit/4f4be713
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-config/tree/4f4be713
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-config/diff/4f4be713

Branch: refs/heads/master
Commit: 4f4be7136e98b3db1489bbf39bafcae02d41692c
Parents: b92ba5a
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Wed Sep 9 07:32:26 2015 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Wed Sep 9 07:32:26 2015 -0700

----------------------------------------------------------------------
 src/config.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-config/blob/4f4be713/src/config.erl
----------------------------------------------------------------------
diff --git a/src/config.erl b/src/config.erl
index 8e79296..4537ad2 100644
--- a/src/config.erl
+++ b/src/config.erl
@@ -75,7 +75,7 @@ to_integer(List) when is_list(List) ->
 to_integer(Int) when is_integer(Int) ->
     Int;
 to_integer(Bin) when is_binary(Bin) ->
-    binary_to_list(list_to_integer(Bin)).
+    list_to_integer(binary_to_list(Bin)).
 
 get_float(Section, Key, Default) when is_float(Default) ->
     try
@@ -97,7 +97,7 @@ to_float(Float) when is_float(Float) ->
 to_float(Int) when is_integer(Int) ->
     list_to_float(integer_to_list(Int));
 to_float(Bin) when is_binary(Bin) ->
-    binary_to_list(list_to_float(Bin)).
+    list_to_float(binary_to_list(Bin)).
 
 get_boolean(Section, Key, Default) when is_boolean(Default) ->
     try


Mime
View raw message