From c2505203d0e4f0eaaf202db6fb1f8cd9e1974ab6 Mon Sep 17 00:00:00 2001 From: hawken93 Date: Sat, 4 Oct 2014 23:22:50 +0200 Subject: [PATCH] Removed casts in g_free(), therefore also removed some const declarations --- 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-simple.c | 6 +++--- src/core/network-proxy-simple.h | 6 +++--- src/core/network-proxy-socks5.c | 4 ++-- src/core/network-proxy-socks5.h | 4 ++-- src/core/network-proxy.h | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/core/network-proxy-http.c b/src/core/network-proxy-http.c index 623b3203..61d49208 100644 --- a/src/core/network-proxy-http.c +++ b/src/core/network-proxy-http.c @@ -31,7 +31,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 04bfdc43..1f63d5e3 100644 --- a/src/core/network-proxy-http.h +++ b/src/core/network-proxy-http.h @@ -5,7 +5,7 @@ struct _network_proxy_http { struct network_proxy proxy; - const char *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 5f632abb..76d40f27 100644 --- a/src/core/network-proxy-priv.h +++ b/src/core/network-proxy-priv.h @@ -28,7 +28,7 @@ inline static void _network_proxy_clone(struct network_proxy *dst, const struct 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-simple.c b/src/core/network-proxy-simple.c index e9f9e44c..289bb6ba 100644 --- a/src/core/network-proxy-simple.c +++ b/src/core/network-proxy-simple.c @@ -26,9 +26,9 @@ static void network_proxy_simple_destroy(struct network_proxy *proxy) { struct _network_proxy_simple *self = container_of(proxy, struct _network_proxy_simple, proxy); - g_free((void *)self->password); - g_free((void *)self->string_after); - g_free((void *)self->string); + g_free(self->password); + g_free(self->string_after); + g_free(self->string); _network_proxy_destroy(proxy); diff --git a/src/core/network-proxy-simple.h b/src/core/network-proxy-simple.h index e55c3925..6c3c8281 100644 --- a/src/core/network-proxy-simple.h +++ b/src/core/network-proxy-simple.h @@ -6,9 +6,9 @@ struct _network_proxy_simple { struct network_proxy proxy; - const char *string_after; - const char *string; - const char *password; + char *string_after; + char *string; + char *password; }; struct network_proxy *_network_proxy_simple_create(void); diff --git a/src/core/network-proxy-socks5.c b/src/core/network-proxy-socks5.c index 8f8fb308..8c4eeaf7 100644 --- a/src/core/network-proxy-socks5.c +++ b/src/core/network-proxy-socks5.c @@ -67,8 +67,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 8dff6ed1..058edaf5 100644 --- a/src/core/network-proxy-socks5.h +++ b/src/core/network-proxy-socks5.h @@ -6,8 +6,8 @@ struct _network_proxy_socks5 { struct network_proxy proxy; - const char *username; - const char *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 c5ec02a2..edd1a655 100644 --- a/src/core/network-proxy.h +++ b/src/core/network-proxy.h @@ -50,7 +50,7 @@ struct network_proxy { const struct network_proxy_send_string_info *); /* hostname of proxy host */ - const char *host; + char *host; /* portnumber of proxy */ int port;