summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Doane <jaydoane@apache.org>2022-09-01 11:52:48 -0700
committerJay Doane <jay.s.doane@gmail.com>2022-09-01 15:13:01 -0700
commitdf8f7b5f19084f5dc0a32e237ba4b554afdeb885 (patch)
treeb17ad93e6c17ca51859b68a9e0fa76e75af1f18d
parente674fd5130b65560a9c98cb877a80bdb7753b241 (diff)
downloadcouchdb-df8f7b5f19084f5dc0a32e237ba4b554afdeb885.tar.gz
Fix 'Bound variable in pattern' warnings
-rw-r--r--src/couch/src/couch_httpd_auth.erl2
-rw-r--r--src/couch/src/couch_util.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/couch/src/couch_httpd_auth.erl b/src/couch/src/couch_httpd_auth.erl
index cdb790f57..cc02a1e9d 100644
--- a/src/couch/src/couch_httpd_auth.erl
+++ b/src/couch/src/couch_httpd_auth.erl
@@ -574,7 +574,7 @@ extract_username(Form) ->
case couch_util:get_value("username", Form, CouchFormat) of
undefined ->
throw({bad_request, <<"request body must contain a username">>});
- CouchFormat ->
+ Format when Format =:= CouchFormat ->
CouchFormat;
Else1 when CouchFormat == undefined ->
Else1;
diff --git a/src/couch/src/couch_util.erl b/src/couch/src/couch_util.erl
index e916bbc69..afce1e0a5 100644
--- a/src/couch/src/couch_util.erl
+++ b/src/couch/src/couch_util.erl
@@ -256,7 +256,7 @@ get_value(Key, List) ->
get_value(Key, List, Default) ->
case lists:keysearch(Key, 1, List) of
- {value, {Key, Value}} ->
+ {value, {K, Value}} when K =:= Key ->
Value;
false ->
Default