diff options
-rw-r--r-- | conf.h | 2 | ||||
-rw-r--r-- | crypting.h | 6 | ||||
-rw-r--r-- | help.h | 2 | ||||
-rw-r--r-- | lib/proxy.c | 4 | ||||
-rw-r--r-- | protocols/nogaim.c | 6 | ||||
-rw-r--r-- | storage.h | 2 |
6 files changed, 11 insertions, 11 deletions
@@ -50,7 +50,7 @@ typedef struct conf int ping_timeout; } conf_t; -conf_t *conf_load( int argc, char *argv[] ); +G_GNUC_MALLOC conf_t *conf_load( int argc, char *argv[] ); void conf_loaddefaults( irc_t *irc ); #endif @@ -24,6 +24,6 @@ */ int checkpass (const char *password, const char *md5sum); -char *hashpass (const char *password); -char *obfucrypt (char *line, const char *password); -char *deobfucrypt (char *line, const char *password); +G_GNUC_MALLOC char *hashpass (const char *password); +G_GNUC_MALLOC char *obfucrypt (char *line, const char *password); +G_GNUC_MALLOC char *deobfucrypt (char *line, const char *password); @@ -42,7 +42,7 @@ typedef struct help struct help *next; } help_t; -help_t *help_init( help_t **help, const char *helpfile ); +G_GNUC_MALLOC help_t *help_init( help_t **help, const char *helpfile ); char *help_get( help_t **help, char *string ); #endif diff --git a/lib/proxy.c b/lib/proxy.c index 7911b06f..dff5d0a4 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -210,7 +210,7 @@ static gboolean http_canwrite(gpointer data, gint source, b_input_condition cond return FALSE; } - if (proxyuser && *proxyuser) { + if (strlen(proxyuser) > 0) { char *t1, *t2; t1 = g_strdup_printf("%s:%s", proxyuser, proxypass); t2 = tobase64(t1); @@ -538,7 +538,7 @@ int proxy_connect(const char *host, int port, b_event_handler func, gpointer dat phb->func = func; phb->data = data; - if ((proxytype == PROXY_NONE) || !proxyhost || !proxyhost[0] || !proxyport || (proxyport == -1)) + if ((proxytype == PROXY_NONE) || strlen(proxyhost) > 0 || !proxyport || (proxyport == -1)) return proxy_connect_none(host, port, phb); else if (proxytype == PROXY_HTTP) return proxy_connect_http(host, port, phb); diff --git a/protocols/nogaim.c b/protocols/nogaim.c index d90870ad..d0395fa9 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -35,7 +35,7 @@ #include "nogaim.h" #include <ctype.h> -static int remove_chat_buddy_silent( struct groupchat *b, char *handle ); +static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ); GSList *connections; @@ -555,7 +555,7 @@ void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, /* Remove him/her from the conversations to prevent PART messages after he/she QUIT already */ for( c = ic->conversations; c; c = c->next ) - remove_chat_buddy_silent( c, (char*) handle ); + remove_chat_buddy_silent( c, handle ); } if( flags & OPT_AWAY ) @@ -820,7 +820,7 @@ void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason ) irc_part( b->ic->irc, u, b->channel ); } -static int remove_chat_buddy_silent( struct groupchat *b, char *handle ) +static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ) { GList *i; @@ -61,6 +61,6 @@ storage_status_t storage_remove (const char *nick, const char *password); storage_status_t storage_rename (const char *onick, const char *nnick, const char *password); void register_storage_backend(storage_t *); -GList *storage_init(const char *primary, char **migrate); +G_GNUC_MALLOC GList *storage_init(const char *primary, char **migrate); #endif /* __STORAGE_H__ */ |