diff options
author | Jay Doane <jaydoane@apache.org> | 2022-06-18 08:17:45 -0700 |
---|---|---|
committer | Jay Doane <jay.s.doane@gmail.com> | 2022-06-18 11:43:27 -0700 |
commit | 1bb3da87cc39b8873d781430a0265618bcc22fe1 (patch) | |
tree | cd213ab22b41816b0357b28d07f96175e4f334af | |
parent | 6da9405ff97acae745ae85f3f9ce92484a7722df (diff) | |
download | couchdb-1bb3da87cc39b8873d781430a0265618bcc22fe1.tar.gz |
Fix deprecated function warning
Function `httpd_util:hexlist_to_integer/1` will be removed in OTP 26.
-rw-r--r-- | src/mem3/src/mem3.erl | 4 | ||||
-rw-r--r-- | src/mem3/src/mem3_reshard_httpd.erl | 4 | ||||
-rw-r--r-- | src/mem3/src/mem3_util.erl | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/mem3/src/mem3.erl b/src/mem3/src/mem3.erl index 5a985b7f8..eff3f2138 100644 --- a/src/mem3/src/mem3.erl +++ b/src/mem3/src/mem3.erl @@ -323,8 +323,8 @@ range(#ordered_shard{range = Range}) -> Range; range(<<"shards/", Start:8/binary, "-", End:8/binary, "/", _/binary>>) -> [ - httpd_util:hexlist_to_integer(binary_to_list(Start)), - httpd_util:hexlist_to_integer(binary_to_list(End)) + list_to_integer(binary_to_list(Start), 16), + list_to_integer(binary_to_list(End), 16) ]. allowed_nodes() -> diff --git a/src/mem3/src/mem3_reshard_httpd.erl b/src/mem3/src/mem3_reshard_httpd.erl index 5abe8025c..509661d9f 100644 --- a/src/mem3/src/mem3_reshard_httpd.erl +++ b/src/mem3/src/mem3_reshard_httpd.erl @@ -295,8 +295,8 @@ validate_range(<<BBin:8/binary, "-", EBin:8/binary>>) -> {B, E} = try { - httpd_util:hexlist_to_integer(binary_to_list(BBin)), - httpd_util:hexlist_to_integer(binary_to_list(EBin)) + list_to_integer(binary_to_list(BBin), 16), + list_to_integer(binary_to_list(EBin), 16) } catch _:_ -> diff --git a/src/mem3/src/mem3_util.erl b/src/mem3/src/mem3_util.erl index 8547fc071..f454e3eb1 100644 --- a/src/mem3/src/mem3_util.erl +++ b/src/mem3/src/mem3_util.erl @@ -221,8 +221,8 @@ build_shards_by_node(DbName, DocProps) -> lists:map( fun(Range) -> [B, E] = string:tokens(?b2l(Range), "-"), - Beg = httpd_util:hexlist_to_integer(B), - End = httpd_util:hexlist_to_integer(E), + Beg = list_to_integer(B, 16), + End = list_to_integer(E, 16), name_shard( #shard{ dbname = DbName, @@ -247,8 +247,8 @@ build_shards_by_range(DbName, DocProps) -> lists:map( fun({Node, Order}) -> [B, E] = string:tokens(?b2l(Range), "-"), - Beg = httpd_util:hexlist_to_integer(B), - End = httpd_util:hexlist_to_integer(E), + Beg = list_to_integer(B, 16), + End = list_to_integer(E, 16), name_shard( #ordered_shard{ dbname = DbName, |