You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2022/12/05 13:08:16 UTC
[couchdb] branch fix-bound-var created (now 26a1e6b7f)
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a change to branch fix-bound-var
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at 26a1e6b7f Fix unbound variable warning
This branch includes the following new commits:
new 26a1e6b7f Fix unbound variable warning
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[couchdb] 01/01: Fix unbound variable warning
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch fix-bound-var
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 26a1e6b7fcb7b8e7f747daa85a55ef8c23d332c7
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Mon Dec 5 14:08:03 2022 +0100
Fix unbound variable warning
While the variable is not really unbound in the case-statement, use a
more up-to-date pattern for binding the value.
---
src/couch/src/couch_server.erl | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index 271f7823f..8cce345e0 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -416,10 +416,11 @@ all_databases(Fun, Acc0) ->
true,
fun(Filename, AccIn) ->
NormFilename = couch_util:normpath(Filename),
- case NormFilename -- NormRoot of
- [$/ | RelativeFilename] -> ok;
- RelativeFilename -> ok
- end,
+ RelativeFilename =
+ case NormFilename -- NormRoot of
+ [$/ | Filename] -> Filename;
+ Filename -> Filename
+ end,
Ext = filename:extension(RelativeFilename),
case Fun(?l2b(filename:rootname(RelativeFilename, Ext)), AccIn) of
{ok, NewAcc} -> NewAcc;