1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

Kill do { ... } while (0); and replace it with goto's.

This commit is contained in:
Alexander Færøy 2016-10-21 17:56:29 +02:00
parent d501a54f4f
commit 0a6e66f8b7
No known key found for this signature in database
GPG Key ID: E15081D5D3C3DB53

View File

@ -776,13 +776,12 @@ int irssi_ssl_handshake(GIOChannel *handle)
ret = 1;
do {
if (pinned_cert_fingerprint != NULL && pinned_cert_fingerprint[0] != '\0') {
ret = g_ascii_strcasecmp(pinned_cert_fingerprint, tls->certificate_fingerprint) == 0;
if (! ret) {
g_warning(" Pinned certificate mismatch");
continue;
goto done;
}
}
@ -791,7 +790,7 @@ int irssi_ssl_handshake(GIOChannel *handle)
if (! ret) {
g_warning(" Pinned public key mismatch");
continue;
goto done;
}
}
@ -800,10 +799,9 @@ int irssi_ssl_handshake(GIOChannel *handle)
if (! ret) {
// irssi_ssl_verify emits a warning itself.
continue;
goto done;
}
}
} while (0);
done:
tls_rec_free(tls);