From 2935008e42d956607bf1893ea6507db6202b3eb1 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 4 Jan 2018 16:12:47 +0100 Subject: [PATCH] Change gnutls-verify-error to be first-match * lisp/net/gnutls.el (gnutls-boot-parameters): Convert to first-match for gnutls-verify-error rather than any-match --- lisp/net/gnutls.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 5afd5c5804..c8f4824b53 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -282,13 +282,9 @@ gnutls-log-level t) ;; if a list, look for hostname matches ((listp gnutls-verify-error) - (apply 'append - (mapcar - (lambda (check) - (when (string-match (nth 0 check) - hostname) - (nth 1 check))) - gnutls-verify-error))) + (cadr (cl-find-if #'(lambda (x) + (string-match (car x) hostname)) + gnutls-verify-error))) ;; else it's nil (t nil)))) (min-prime-bits (or min-prime-bits gnutls-min-prime-bits))) -- 2.16.0.rc0