mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
move decls before code
This commit is contained in:
parent
b332d448f7
commit
2b918fd9b8
@ -583,9 +583,6 @@ static void set_cipher_info(TLS_REC *tls, SSL *ssl)
|
||||
|
||||
static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_fingerprint, size_t cert_fingerprint_size, unsigned char *public_key_fingerprint, size_t public_key_fingerprint_size)
|
||||
{
|
||||
g_return_if_fail(tls != NULL);
|
||||
g_return_if_fail(cert != NULL);
|
||||
|
||||
EVP_PKEY *pubkey = NULL;
|
||||
char *cert_fingerprint_hex = NULL;
|
||||
char *public_key_fingerprint_hex = NULL;
|
||||
@ -594,6 +591,9 @@ static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_finger
|
||||
char buffer[128];
|
||||
size_t length;
|
||||
|
||||
g_return_if_fail(tls != NULL);
|
||||
g_return_if_fail(cert != NULL);
|
||||
|
||||
pubkey = X509_get_pubkey(cert);
|
||||
|
||||
cert_fingerprint_hex = binary_to_hex(cert_fingerprint, cert_fingerprint_size);
|
||||
@ -647,9 +647,6 @@ static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_finger
|
||||
|
||||
static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl)
|
||||
{
|
||||
g_return_if_fail(tls != NULL);
|
||||
g_return_if_fail(ssl != NULL);
|
||||
|
||||
int nid;
|
||||
char *key = NULL;
|
||||
char *value = NULL;
|
||||
@ -662,6 +659,9 @@ static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl)
|
||||
TLS_CERT_ENTRY_REC *tls_cert_entry_rec = NULL;
|
||||
ASN1_STRING *data = NULL;
|
||||
|
||||
g_return_if_fail(tls != NULL);
|
||||
g_return_if_fail(ssl != NULL);
|
||||
|
||||
chain = SSL_get_peer_cert_chain(ssl);
|
||||
|
||||
if (chain == NULL)
|
||||
@ -714,9 +714,6 @@ static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl)
|
||||
|
||||
static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl)
|
||||
{
|
||||
g_return_if_fail(tls != NULL);
|
||||
g_return_if_fail(ssl != NULL);
|
||||
|
||||
#ifdef SSL_get_server_tmp_key
|
||||
/* Show ephemeral key information. */
|
||||
EVP_PKEY *ephemeral_key = NULL;
|
||||
@ -729,6 +726,9 @@ static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl)
|
||||
char *cname = NULL;
|
||||
int nid;
|
||||
|
||||
g_return_if_fail(tls != NULL);
|
||||
g_return_if_fail(ssl != NULL);
|
||||
|
||||
if (SSL_get_server_tmp_key(ssl, &ephemeral_key)) {
|
||||
switch (EVP_PKEY_id(ephemeral_key)) {
|
||||
case EVP_PKEY_DH:
|
||||
|
@ -563,8 +563,10 @@ GSList *windows_get_sorted(void)
|
||||
begin = windows_seq_begin();
|
||||
|
||||
while (iter != begin) {
|
||||
WINDOW_REC *rec;
|
||||
|
||||
iter = g_sequence_iter_prev(iter);
|
||||
WINDOW_REC *rec = g_sequence_get(iter);
|
||||
rec = g_sequence_get(iter);
|
||||
|
||||
sorted = g_slist_prepend(sorted, rec);
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ static char *perl_expando_event(PerlExpando *rec, SERVER_REC *server,
|
||||
|
||||
ret = NULL;
|
||||
if (SvTRUE(ERRSV)) {
|
||||
char *error;
|
||||
PERL_SCRIPT_REC *script = rec->script;
|
||||
|
||||
(void) POPs;
|
||||
@ -85,7 +86,7 @@ static char *perl_expando_event(PerlExpando *rec, SERVER_REC *server,
|
||||
script_unregister_expandos(script);
|
||||
/* rec has been freed now */
|
||||
|
||||
char *error = g_strdup(SvPV_nolen(ERRSV));
|
||||
error = g_strdup(SvPV_nolen(ERRSV));
|
||||
signal_emit("script error", 2, script, error);
|
||||
g_free(error);
|
||||
} else if (retcount > 0) {
|
||||
|
@ -67,7 +67,7 @@ static void perl_statusbar_event(char *function, SBAR_ITEM_REC *item,
|
||||
|
||||
if (SvTRUE(ERRSV)) {
|
||||
PERL_SCRIPT_REC *script;
|
||||
char *package;
|
||||
char *package, *error;
|
||||
|
||||
package = perl_function_get_package(function);
|
||||
script = perl_script_find_package(package);
|
||||
@ -78,7 +78,7 @@ static void perl_statusbar_event(char *function, SBAR_ITEM_REC *item,
|
||||
script_unregister_statusbars(script);
|
||||
}
|
||||
|
||||
char *error = g_strdup(SvPV_nolen(ERRSV));
|
||||
error = g_strdup(SvPV_nolen(ERRSV));
|
||||
signal_emit("script error", 2, script, error);
|
||||
g_free(error);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user