Skip to content

Commit

Permalink
Remove obsolete code for Erlang/OTP older than 20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed Jun 24, 2024
1 parent 0f3b352 commit 73f02dd
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/ejabberd_ctl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,9 @@ get_shell_info() ->
_:_ -> {78, false}
end.
%% Erlang/OTP 20.0 introduced string:find/2, but we must support old 19.3
string_find([], _SearchPattern) ->
nomatch;
string_find([A | String], [A]) ->
String;
string_find([_ | String], SearchPattern) ->
string_find(String, SearchPattern).
%% Split this command description in several lines of proper length
prepare_description(DescInit, MaxC, Desc) ->
case string_find(Desc, "\n") of
case string:find(Desc, "\n") of
nomatch ->
prepare_description2(DescInit, MaxC, Desc);
_ ->
Expand Down

0 comments on commit 73f02dd

Please sign in to comment.