Subject: bug#49055: 28.0.50; [PATCH] De-obfuscate gnutls_handshake loop

From: [email-masked]
Date: Sat, 19 Jun 2021 13:34:21 -0400

>   . the gnutls_error_is_fatal call is missing from the new code

Yes, and just as well since it's redundant with `emacs_gnutls_handle_error`.

>   . the negative values of 'ret' (if they are significant) aren't
>     tested anymore

This unchanged line 626 begs to differ.

while ((ret = gnutls_handshake (state)) < 0)

>   . the condition of GNUTLS_E_INTERRUPTED is tested only once, and
>     immediately causes the outer while-loop to be abandoned

Yes, as the commit before e87e6a2 did.  You do realize I hope that e87e6a2, in
its desire to keep the loop going under GNUTLS_E_INTERRUPTED, almost
certainly did not intend to call `gnutls_handshake` twice when
GNUTLS_E_INTERRUPTED was not applicable.

> I'd love to see some rationale for these differences.

Your skepticism is a credit to your earnestness.  However, your expert
scrutiny is better applied to misguided commits like e87e6a2 and d84d69d.