aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-12-14 13:53:05 +0100
committerBjörn Gustavsson <[email protected]>2015-12-16 15:52:26 +0100
commit8a2c833d1ff02957d2fbd15640e876a5247a1b63 (patch)
treeaf208e91a0c22be0afd412985b8c8b6a5f345041
parentea2481f1fdec3ce9f510201130eca51ab553fa71 (diff)
downloadotp-8a2c833d1ff02957d2fbd15640e876a5247a1b63.tar.gz
otp-8a2c833d1ff02957d2fbd15640e876a5247a1b63.tar.bz2
otp-8a2c833d1ff02957d2fbd15640e876a5247a1b63.zip
erl_prim_loader: Clean up string_match()
Part of the return value for string_match/3 is not used by its only caller. Eliminate the unused part of the return value and the accumulator argument for string_match().
-rw-r--r--erts/preloaded/src/erl_prim_loader.erl18
1 files changed, 9 insertions, 9 deletions
diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl
index 91ef2bd6d0..5f88029585 100644
--- a/erts/preloaded/src/erl_prim_loader.erl
+++ b/erts/preloaded/src/erl_prim_loader.erl
@@ -1214,22 +1214,22 @@ name_split(undefined, File) ->
name_split(ArchiveFile, File0) ->
%% Look first in primary archive
File = absname(File0),
- case string_match(real_path(File), ArchiveFile, []) of
+ case string_match(real_path(File), ArchiveFile) of
no_match ->
%% Archive or plain file
name_split(undefined, File);
- {match, _RevPrimArchiveFile, FileInArchive} ->
+ {match, FileInArchive} ->
%% Primary archive
{archive, ArchiveFile, FileInArchive}
end.
-string_match([Char | File], [Char | Archive], RevTop) ->
- string_match(File, Archive, [Char | RevTop]);
-string_match([] = File, [], RevTop) ->
- {match, RevTop, File};
-string_match([$/ | File], [], RevTop) ->
- {match, RevTop, File};
-string_match(_File, _Archive, _RevTop) ->
+string_match([Char | File], [Char | Archive]) ->
+ string_match(File, Archive);
+string_match([] = File, []) ->
+ {match, File};
+string_match([$/ | File], []) ->
+ {match, File};
+string_match(_File, _Archive) ->
no_match.
archive_split("/"++File, RevExt, Acc) ->