File 0657-ftp-remove-redundant-is_-tuple-binary-1.patch of Package erlang
From c028580a97db73e1f9bba28b0facf4db8a59ff3d Mon Sep 17 00:00:00 2001
From: Kiko Fernandez-Reyes <kiko@erlang.org>
Date: Fri, 3 Feb 2023 13:32:38 +0100
Subject: [PATCH 2/2] ftp: remove redundant is_{tuple/binary}/1
---
lib/ftp/src/ftp.erl | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/ftp/src/ftp.erl b/lib/ftp/src/ftp.erl
index 5ed87c937c..3408a0aca6 100644
--- a/lib/ftp/src/ftp.erl
+++ b/lib/ftp/src/ftp.erl
@@ -2338,7 +2338,7 @@ file_close(Fd) ->
file_read(Fd) ->
case file:read(Fd, ?FILE_BUFSIZE) of
- {ok, Bytes} when is_binary(Bytes) ->
+ {ok, Bytes} ->
{ok, byte_size(Bytes), Bytes};
eof ->
{ok, 0, []};
@@ -2518,8 +2518,7 @@ open_options(Options) ->
ValidateHost =
fun(Host) when is_list(Host) ->
true;
- (Host) when is_tuple(Host) andalso
- ((tuple_size(Host) =:= 4) orelse (tuple_size(Host) =:= 8)) ->
+ (Host) when tuple_size(Host) =:= 4; tuple_size(Host) =:= 8 ->
true;
(_) ->
false
--
2.35.3