File otp_src_21.0-tftp-tftp_binary.patch of Package erlang
diff -Ndurp otp_src_21.0/lib/tftp/src/tftp_binary.erl otp_src_21.0-tftp-tftp_binary/lib/tftp/src/tftp_binary.erl
--- otp_src_21.0/lib/tftp/src/tftp_binary.erl 2018-06-19 09:24:56.000000000 +0300
+++ otp_src_21.0-tftp-tftp_binary/lib/tftp/src/tftp_binary.erl 2018-06-25 03:20:28.729353605 +0300
@@ -170,12 +170,10 @@ handle_options(Access, Bin, Mode, Option
Options2 = do_handle_options(Access, Bin, Options),
{ok, IsNetworkAscii, Options2}.
-handle_mode(Mode, IsNativeAscii) ->
- case Mode of
- "netascii" when IsNativeAscii =:= true -> true;
- "octet" -> false;
- _ -> throw({error, {badop, "Illegal mode " ++ Mode}})
- end.
+handle_mode("netascii", true) -> true;
+handle_mode("octet", _IsNativeAscii) -> false;
+handle_mode(Mode, _IsNativeAscii) when is_list(Mode) -> throw({error, {badop, "Illegal mode " ++ Mode}});
+handle_mode(Mode, _IsNativeAscii) -> throw({error, {badop, Mode}}).
do_handle_options(Access, Bin, [{Key, Val} | T]) ->
case Key of