File 2691-Remove-and-or-in-tftp.patch of Package erlang
From 1e816598c3061e560f79a60908bbeaa58f5e02b6 Mon Sep 17 00:00:00 2001
From: Maria Scott <maria-12648430@hnc-agency.org>
Date: Tue, 17 Feb 2026 10:03:57 +0100
Subject: [PATCH] Remove and/or in tftp
---
lib/tftp/src/tftp_lib.erl | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/tftp/src/tftp_lib.erl b/lib/tftp/src/tftp_lib.erl
index d30d6277db..fb8f0ce921 100644
--- a/lib/tftp/src/tftp_lib.erl
+++ b/lib/tftp/src/tftp_lib.erl
@@ -228,14 +226,15 @@ do_parse_config([], #config{udp_host = Host,
IsInet = lists:member(inet, UdpOptions),
Host2 =
if
- (IsInet and not IsInet6); (not IsInet and not IsInet6) ->
+ IsInet, not IsInet6;
+ not IsInet, not IsInet6 ->
case inet:getaddr(Host, inet) of
{ok, Addr} ->
Addr;
{error, Reason} ->
exit({badarg, {host, Reason}})
end;
- (IsInet6 and not IsInet) ->
+ IsInet6, not IsInet ->
case inet:getaddr(Host, inet6) of
{ok, Addr} ->
Addr;
--
2.51.0