diff options
-rw-r--r-- | src/core/ignore.h | 6 | ||||
-rw-r--r-- | src/core/network-openssl.c | 20 | ||||
-rw-r--r-- | src/fe-fuzz/irssi.c | 2 | ||||
-rw-r--r-- | src/fe-text/statusbar-items.c | 4 | ||||
-rw-r--r-- | src/irc/core/sasl.c | 6 |
5 files changed, 19 insertions, 19 deletions
diff --git a/src/core/ignore.h b/src/core/ignore.h index e18be3c4..31171b58 100644 --- a/src/core/ignore.h +++ b/src/core/ignore.h @@ -27,14 +27,14 @@ int ignore_check(SERVER_REC *server, const char *nick, const char *host, const char *channel, const char *text, int level); enum { - IGNORE_FIND_PATTERN = 0x01, // Match the pattern - IGNORE_FIND_NOACT = 0x02, // Exclude the targets with NOACT level + IGNORE_FIND_PATTERN = 0x01, /* Match the pattern */ + IGNORE_FIND_NOACT = 0x02, /* Exclude the targets with NOACT level */ }; IGNORE_REC *ignore_find_full (const char *servertag, const char *mask, const char *pattern, char **channels, const int flags); -// Convenience wrappers around ignore_find_full, for compatibility purpose +/* Convenience wrappers around ignore_find_full, for compatibility purpose */ IGNORE_REC *ignore_find(const char *servertag, const char *mask, char **channels); IGNORE_REC *ignore_find_noact(const char *servertag, const char *mask, char **channels, int noact); diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 7ec902fb..26496f47 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -600,7 +600,7 @@ static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_finger tls_rec_set_certificate_fingerprint(tls, cert_fingerprint_hex); tls_rec_set_certificate_fingerprint_algorithm(tls, "SHA256"); - // Show algorithm. + /* Show algorithm. */ switch (EVP_PKEY_id(pubkey)) { case EVP_PKEY_RSA: tls_rec_set_public_key_algorithm(tls, "RSA"); @@ -624,7 +624,7 @@ static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_finger tls_rec_set_public_key_size(tls, EVP_PKEY_bits(pubkey)); tls_rec_set_public_key_fingerprint_algorithm(tls, "SHA256"); - // Read the NotBefore timestamp. + /* Read the NotBefore timestamp. */ bio = BIO_new(BIO_s_mem()); ASN1_TIME_print(bio, X509_get_notBefore(cert)); length = BIO_read(bio, buffer, sizeof(buffer)); @@ -632,7 +632,7 @@ static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_finger BIO_free(bio); tls_rec_set_not_before(tls, buffer); - // Read the NotAfter timestamp. + /* Read the NotAfter timestamp. */ bio = BIO_new(BIO_s_mem()); ASN1_TIME_print(bio, X509_get_notAfter(cert)); length = BIO_read(bio, buffer, sizeof(buffer)); @@ -670,7 +670,7 @@ static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl) for (i = 0; i < sk_X509_num(chain); i++) { cert_rec = tls_cert_create_rec(); - // Subject. + /* Subject. */ name = X509_get_subject_name(sk_X509_value(chain, i)); for (j = 0; j < X509_NAME_entry_count(name); j++) { @@ -689,7 +689,7 @@ static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl) tls_cert_rec_append_subject_entry(cert_rec, tls_cert_entry_rec); } - // Issuer. + /* Issuer. */ name = X509_get_issuer_name(sk_X509_value(chain, i)); for (j = 0; j < X509_NAME_entry_count(name); j++) { @@ -718,10 +718,10 @@ static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl) g_return_if_fail(ssl != NULL); #ifdef SSL_get_server_tmp_key - // Show ephemeral key information. + /* Show ephemeral key information. */ EVP_PKEY *ephemeral_key = NULL; - // OPENSSL_NO_EC is for solaris 11.3 (2016), github ticket #598 + /* OPENSSL_NO_EC is for solaris 11.3 (2016), github ticket #598 */ #ifndef OPENSSL_NO_EC EC_KEY *ec_key = NULL; #endif @@ -759,7 +759,7 @@ static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl) EVP_PKEY_free(ephemeral_key); } -#endif // SSL_get_server_tmp_key. +#endif /* SSL_get_server_tmp_key. */ } GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, SERVER_REC *server) @@ -866,7 +866,7 @@ int irssi_ssl_handshake(GIOChannel *handle) set_peer_cert_chain_info(tls, chan->ssl); set_server_temporary_key_info(tls, chan->ssl); - // Emit the TLS rec. + /* Emit the TLS rec. */ signal_emit("tls handshake finished", 2, chan->server, tls); ret = 1; @@ -893,7 +893,7 @@ int irssi_ssl_handshake(GIOChannel *handle) ret = irssi_ssl_verify(chan->ssl, chan->ctx, chan->server->connrec->address, chan->port, cert, chan->server, tls); if (! ret) { - // irssi_ssl_verify emits a warning itself. + /* irssi_ssl_verify emits a warning itself. */ goto done; } } diff --git a/src/fe-fuzz/irssi.c b/src/fe-fuzz/irssi.c index 77892aaf..c1b2ca9b 100644 --- a/src/fe-fuzz/irssi.c +++ b/src/fe-fuzz/irssi.c @@ -21,7 +21,7 @@ #include "module.h" #include "modules-load.h" #include "levels.h" -#include "../fe-text/module-formats.h" // need to explicitly grab from fe-text +#include "../fe-text/module-formats.h" /* need to explicitly grab from fe-text */ #include "themes.h" #include "core.h" #include "fe-common-core.h" diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c index de4499b4..c7d6bcfb 100644 --- a/src/fe-text/statusbar-items.c +++ b/src/fe-text/statusbar-items.c @@ -369,8 +369,8 @@ static void item_lag(SBAR_ITEM_REC *item, int get_size_only) last_lag_unknown = lag_unknown; if (lag_unknown) { - // "??)" in C becomes ']' - // See: https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C + /* "??)" in C becomes ']' + See: https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C */ g_snprintf(str, sizeof(str), "%d (?""?)", lag / 100); } else { if (lag % 100 == 0) diff --git a/src/irc/core/sasl.c b/src/irc/core/sasl.c index 635b7dfb..2b589579 100644 --- a/src/irc/core/sasl.c +++ b/src/irc/core/sasl.c @@ -30,16 +30,16 @@ * Based on IRCv3 SASL Extension Specification: * http://ircv3.net/specs/extensions/sasl-3.1.html */ -#define AUTHENTICATE_CHUNK_SIZE 400 // bytes +#define AUTHENTICATE_CHUNK_SIZE 400 /* bytes */ /* * Maximum size to allow the buffer to grow to before the next fragment comes in. Note that * due to the way fragmentation works, the maximum message size will actually be: * floor(AUTHENTICATE_MAX_SIZE / AUTHENTICATE_CHUNK_SIZE) + AUTHENTICATE_CHUNK_SIZE - 1 */ -#define AUTHENTICATE_MAX_SIZE 8192 // bytes +#define AUTHENTICATE_MAX_SIZE 8192 /* bytes */ -#define SASL_TIMEOUT (20 * 1000) // ms +#define SASL_TIMEOUT (20 * 1000) /* ms */ static gboolean sasl_timeout(IRC_SERVER_REC *server) { |