From df66b2e6fe3c1c3c79300b1c88cb06415c15c2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 4 Jul 2015 16:36:42 +0200 Subject: irc: fix type of value returned by function irc_buffer_build_name --- src/plugins/irc/irc-buffer.c | 2 +- src/plugins/irc/irc-buffer.h | 3 ++- src/plugins/irc/irc-channel.c | 4 ++-- src/plugins/irc/irc-protocol.c | 3 ++- src/plugins/irc/irc-server.c | 5 ++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plugins/irc/irc-buffer.c b/src/plugins/irc/irc-buffer.c index 41491f10e..a1be1c361 100644 --- a/src/plugins/irc/irc-buffer.c +++ b/src/plugins/irc/irc-buffer.c @@ -87,7 +87,7 @@ irc_buffer_get_server_and_channel (struct t_gui_buffer *buffer, * Builds buffer name with a server and a channel. */ -char * +const char * irc_buffer_build_name (const char *server, const char *channel) { static char buffer[128]; diff --git a/src/plugins/irc/irc-buffer.h b/src/plugins/irc/irc-buffer.h index 14eda76ee..e02ffea1e 100644 --- a/src/plugins/irc/irc-buffer.h +++ b/src/plugins/irc/irc-buffer.h @@ -51,7 +51,8 @@ struct t_irc_channel; extern void irc_buffer_get_server_and_channel (struct t_gui_buffer *buffer, struct t_irc_server **server, struct t_irc_channel **channel); -extern char *irc_buffer_build_name (const char *server, const char *channel); +extern const char *irc_buffer_build_name (const char *server, + const char *channel); extern int irc_buffer_close_cb (void *data, struct t_gui_buffer *buffer); extern int irc_buffer_nickcmp_cb (void *data, struct t_gui_buffer *buffer, diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 1a6bc7226..11d0c4df1 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -236,8 +236,8 @@ irc_channel_create_buffer (struct t_irc_server *server, struct t_gui_buffer *ptr_buffer, *ptr_buffer_for_merge; int buffer_created, current_buffer_number, buffer_position; int manual_join, noswitch; - char *buffer_name, str_number[32], *channel_name_lower; - const char *short_name, *localvar_channel; + char str_number[32], *channel_name_lower; + const char *buffer_name, *short_name, *localvar_channel; buffer_created = 0; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 13e52e9e2..65feed475 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1100,7 +1100,8 @@ IRC_PROTOCOL_CALLBACK(nick) { struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick, *ptr_nick_found; - char *new_nick, *old_color, *buffer_name, str_tags[512]; + char *new_nick, *old_color, str_tags[512]; + const char *buffer_name; int local_nick, smart_filter; struct t_irc_channel_speaking *ptr_nick_speaking; diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index e40f86f40..93d5e877f 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1644,9 +1644,8 @@ int irc_server_rename (struct t_irc_server *server, const char *new_name) { int length; - char *mask, *pos_option, *new_option_name, *buffer_name; - char charset_modifier[256]; - const char *option_name; + char *mask, *pos_option, *new_option_name, charset_modifier[256]; + const char *buffer_name, *option_name; struct t_infolist *infolist; struct t_config_option *ptr_option; struct t_irc_channel *ptr_channel; -- cgit v1.2.3