From: Robert Pluim Date: Fri, 20 Jun 2025 10:01:59 +0000 (+0200) Subject: ; Improve previous change X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76da97c9ca16b6490ebb5ee7d62264335b6d8d92;p=emacs.git ; Improve previous change * test/lisp/net/network-stream-tests.el (network-test--resolve-system-name): Resolve addresses once not twice. (cherry picked from commit 04a1a53de19e74e06aba5c05f73aa6b1fdccae4f) --- diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index 1684900f7db..d868562f5cf 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -143,7 +143,7 @@ (defun network-test--resolve-system-name () (let ((addresses (network-lookup-address-info (system-name)))) (if addresses - (cl-loop for address in (network-lookup-address-info (system-name)) + (cl-loop for address in addresses when (or (and (= (length address) 5) ;; IPv4 localhost addresses start with 127. (= (elt address 0) 127))