summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-07-04 16:36:42 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-07-04 16:36:42 +0200
commitdf66b2e6fe3c1c3c79300b1c88cb06415c15c2a7 (patch)
tree102fc22520b88e97727b8bb8e8d10431272a48db
parent0c79b2fda861922e4351fab262d57981d4771dac (diff)
downloadweechat-df66b2e6fe3c1c3c79300b1c88cb06415c15c2a7.zip
irc: fix type of value returned by function irc_buffer_build_name
-rw-r--r--src/plugins/irc/irc-buffer.c2
-rw-r--r--src/plugins/irc/irc-buffer.h3
-rw-r--r--src/plugins/irc/irc-channel.c4
-rw-r--r--src/plugins/irc/irc-protocol.c3
-rw-r--r--src/plugins/irc/irc-server.c5
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;