From e9211c8ed4290687266175e33451ac11df43ceba Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 14 Apr 2016 14:23:57 +0100 Subject: [PATCH] Removed casts in g_free(), therefore also removed some const declarations From original patch by hawken93 4th Oct 2014 --- src/core/network-proxy-http.c | 2 +- src/core/network-proxy-http.h | 2 +- src/core/network-proxy-priv.h | 2 +- src/core/network-proxy-socks5.c | 4 ++-- src/core/network-proxy-socks5.h | 4 ++-- src/core/network-proxy.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/network-proxy-http.c b/src/core/network-proxy-http.c index fa27c7c1..10363986 100644 --- a/src/core/network-proxy-http.c +++ b/src/core/network-proxy-http.c @@ -29,7 +29,7 @@ static void network_proxy_http_destroy(struct network_proxy *proxy) { struct _network_proxy_http *self = container_of(proxy, struct _network_proxy_http, proxy); - g_free((void *)self->password); + g_free(self->password); _network_proxy_destroy(proxy); g_free(self); diff --git a/src/core/network-proxy-http.h b/src/core/network-proxy-http.h index b47bfc5e..6994f917 100644 --- a/src/core/network-proxy-http.h +++ b/src/core/network-proxy-http.h @@ -21,7 +21,7 @@ struct _network_proxy_http { struct network_proxy proxy; - char const *password; + char *password; }; struct network_proxy *_network_proxy_http_create(void); diff --git a/src/core/network-proxy-priv.h b/src/core/network-proxy-priv.h index 8e5fcf95..c2a88e10 100644 --- a/src/core/network-proxy-priv.h +++ b/src/core/network-proxy-priv.h @@ -44,7 +44,7 @@ inline static void _network_proxy_clone(struct network_proxy *dst, struct networ inline static void _network_proxy_destroy(struct network_proxy *proxy) { - g_free((void *)proxy->host); + g_free(proxy->host); } diff --git a/src/core/network-proxy-socks5.c b/src/core/network-proxy-socks5.c index 69214b10..b0c08afb 100644 --- a/src/core/network-proxy-socks5.c +++ b/src/core/network-proxy-socks5.c @@ -65,8 +65,8 @@ static void network_proxy_socks5_destroy(struct network_proxy *proxy) { struct _network_proxy_socks5 *self = container_of(proxy, struct _network_proxy_socks5, proxy); - g_free((void *)self->password); - g_free((void *)self->username); + g_free(self->password); + g_free(self->username); _network_proxy_destroy(proxy); g_free(self); } diff --git a/src/core/network-proxy-socks5.h b/src/core/network-proxy-socks5.h index c1e7e22c..b311265f 100644 --- a/src/core/network-proxy-socks5.h +++ b/src/core/network-proxy-socks5.h @@ -22,8 +22,8 @@ struct _network_proxy_socks5 { struct network_proxy proxy; - char const *username; - char const *password; + char *username; + char *password; }; struct network_proxy *_network_proxy_socks5_create(void); diff --git a/src/core/network-proxy.h b/src/core/network-proxy.h index 56365639..be3e5169 100644 --- a/src/core/network-proxy.h +++ b/src/core/network-proxy.h @@ -24,7 +24,7 @@ * class */ struct network_proxy_send_string_info { - char const *host; /* hostname of the IRC server */ + char *host; /* hostname of the IRC server */ uint16_t port; /* portnumber of the IRC server */ /* function which is used to send string; usually irc_send_cmd_now() */