Removed casts in g_free(), therefore also removed some const declarations

From original patch by hawken93 <hawken@thehawken.org> 4th Oct 2014
This commit is contained in:
Bob Mottram 2016-04-14 14:23:57 +01:00
commit e9211c8ed4
6 changed files with 8 additions and 8 deletions

View file

@ -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); 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); _network_proxy_destroy(proxy);
g_free(self); g_free(self);

View file

@ -21,7 +21,7 @@
struct _network_proxy_http { struct _network_proxy_http {
struct network_proxy proxy; struct network_proxy proxy;
char const *password; char *password;
}; };
struct network_proxy *_network_proxy_http_create(void); struct network_proxy *_network_proxy_http_create(void);

View file

@ -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) inline static void _network_proxy_destroy(struct network_proxy *proxy)
{ {
g_free((void *)proxy->host); g_free(proxy->host);
} }

View file

@ -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); struct _network_proxy_socks5 *self = container_of(proxy, struct _network_proxy_socks5, proxy);
g_free((void *)self->password); g_free(self->password);
g_free((void *)self->username); g_free(self->username);
_network_proxy_destroy(proxy); _network_proxy_destroy(proxy);
g_free(self); g_free(self);
} }

View file

@ -22,8 +22,8 @@
struct _network_proxy_socks5 { struct _network_proxy_socks5 {
struct network_proxy proxy; struct network_proxy proxy;
char const *username; char *username;
char const *password; char *password;
}; };
struct network_proxy *_network_proxy_socks5_create(void); struct network_proxy *_network_proxy_socks5_create(void);

View file

@ -24,7 +24,7 @@
* class */ * class */
struct network_proxy_send_string_info 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 */ uint16_t port; /* portnumber of the IRC server */
/* function which is used to send string; usually irc_send_cmd_now() */ /* function which is used to send string; usually irc_send_cmd_now() */