From 73f02dd2846c057ac9668ff50a3cfe8b19369d94 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 24 Jun 2024 13:58:56 +0200 Subject: [PATCH] Remove obsolete code for Erlang/OTP older than 20.0 --- src/ejabberd_ctl.erl | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index 87e2cb62401..14780278af4 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -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); _ ->