From 714b0241cbb85d98e7137fd513b2705617711aad Mon Sep 17 00:00:00 2001 From: hawken93 Date: Fri, 3 Oct 2014 23:41:57 +0200 Subject: [PATCH] Change coding style --- src/core/network-openssl.c | 2 +- src/core/network-proxy-http.c | 8 ++++---- src/core/network.c | 4 ++-- src/core/network.h | 4 ++-- src/irc/core/irc-servers.c | 10 +++++----- src/irc/core/irc-servers.h | 1 - 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 177a40db..0b0fb881 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -551,7 +551,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_ return gchan; } -GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port, +GIOChannel *net_connect_proxy_ssl(const struct network_proxy *proxy, const char *host, int port, IPADDR *ip, IPADDR *my_ip, SERVER_REC *server) { GIOChannel *handle, *ssl_handle; diff --git a/src/core/network-proxy-http.c b/src/core/network-proxy-http.c index 450e0784..623b3203 100644 --- a/src/core/network-proxy-http.c +++ b/src/core/network-proxy-http.c @@ -58,9 +58,9 @@ static bool send_connect(struct _network_proxy_http *proxy, GIOChannel *ch, sprintf(port_str, "%u", port); if (!_network_proxy_send_all(ch, "CONNECT ", -1) || - !_network_proxy_send_all(ch, address, -1) || - !_network_proxy_send_all(ch, ":", -1) || - !_network_proxy_send_all(ch, port_str, -1) || + !_network_proxy_send_all(ch, address, -1) || + !_network_proxy_send_all(ch, ":", -1) || + !_network_proxy_send_all(ch, port_str, -1) || !_network_proxy_send_all(ch, " HTTP/1.0\r\n\r\n", -1) || !_network_proxy_flush(ch)) return false; @@ -96,7 +96,7 @@ static int read_response(struct _network_proxy_http *proxy, GIOChannel *ch) if (state==0) { if (g_str_has_prefix(line.str, "HTTP/1.0 ")) { resp = g_strndup(line.str+9, line.len-9-2); - rc = g_ascii_strtoull(resp, NULL, 10); + rc = g_ascii_strtoull(resp, NULL, 10); } else { g_warning("unexpected HTTP response: '%s'", line.str); goto err; diff --git a/src/core/network.c b/src/core/network.c index 75357f92..34319c58 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -228,8 +228,8 @@ GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip) } /* Connect to socket */ -GIOChannel *net_connect_proxy(struct network_proxy const *proxy, - char const *host, int port, IPADDR *ip, IPADDR *my_ip) +GIOChannel *net_connect_proxy(const struct network_proxy *proxy, + const char *host, int port, IPADDR *ip, IPADDR *my_ip) { if (proxy) return proxy->connect(proxy, ip, host, port); diff --git a/src/core/network.h b/src/core/network.h index b11d1ca2..138dd31a 100644 --- a/src/core/network.h +++ b/src/core/network.h @@ -50,12 +50,12 @@ int net_ip_compare(IPADDR *ip1, IPADDR *ip2); /* Connect to socket */ GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip); /* Connect to socket with ip address and SSL*/ -GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port, +GIOChannel *net_connect_proxy_ssl(const struct network_proxy *proxy, const char c*host, int port, IPADDR *ip, IPADDR *my_ip, SERVER_REC *server); int irssi_ssl_handshake(GIOChannel *handle); /* Connect to socket with ip address */ GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip); -GIOChannel *net_connect_proxy(struct network_proxy const *proxy, char const *host, int port, +GIOChannel *net_connect_proxy(const struct network_proxy *proxy, const char *host, int port, IPADDR *ip, IPADDR *my_ip); /* Connect to named UNIX socket */ GIOChannel *net_connect_unix(const char *path); diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index daa85438..ccd19aa8 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -196,11 +196,11 @@ static void server_init(IRC_SERVER_REC *server) IRC_SERVER_CONNECT_REC *conn; char *address, *ptr, *username, *cmd; GTimeVal now; - struct network_proxy_send_string_info const send_info = { - .host = server->connrec->address, - .port = server->connrec->port, - .func = irc_send_cmd_now_wrapper, - .obj = server + const struct network_proxy_send_string_info send_info = { + .host = server->connrec->address, + .port = server->connrec->port, + .func = irc_send_cmd_now_wrapper, + .obj = server }; g_return_if_fail(server != NULL); diff --git a/src/irc/core/irc-servers.h b/src/irc/core/irc-servers.h index ac08d369..c6119df3 100644 --- a/src/irc/core/irc-servers.h +++ b/src/irc/core/irc-servers.h @@ -109,7 +109,6 @@ struct _IRC_SERVER_REC { SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn); void irc_server_connect(SERVER_REC *server); - /* Purge server output, either all or for specified target */ void irc_server_purge_output(IRC_SERVER_REC *server, const char *target);