summaryrefslogtreecommitdiff
path: root/src/plugins/xfer
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-11-15 22:35:12 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-11-15 22:35:12 +0100
commit8724fc18afa1d2702eeed9aa6e7d825d25cbda98 (patch)
tree735f8d09799db47ff387129bb8613e940bb4fbf7 /src/plugins/xfer
parente1d639d7ebbea6cf1c28e6d3cba284f5a3562dac (diff)
downloadweechat-8724fc18afa1d2702eeed9aa6e7d825d25cbda98.zip
Use of const for some functions returning "char *"
Diffstat (limited to 'src/plugins/xfer')
-rw-r--r--src/plugins/xfer/xfer-file.c3
-rw-r--r--src/plugins/xfer/xfer.c14
2 files changed, 10 insertions, 7 deletions
diff --git a/src/plugins/xfer/xfer-file.c b/src/plugins/xfer/xfer-file.c
index 20e2983d5..f2c86aad7 100644
--- a/src/plugins/xfer/xfer-file.c
+++ b/src/plugins/xfer/xfer-file.c
@@ -76,7 +76,8 @@ xfer_file_resume (struct t_xfer *xfer, const char *filename)
void
xfer_file_find_filename (struct t_xfer *xfer)
{
- char *weechat_home, *dir1, *dir2, *filename2, *dir_separator;
+ const char *weechat_home, *dir_separator;
+ char *dir1, *dir2, *filename2;
if (!XFER_IS_FILE(xfer->type))
return;
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c
index acc02ddc3..7fe2ad521 100644
--- a/src/plugins/xfer/xfer.c
+++ b/src/plugins/xfer/xfer.c
@@ -125,7 +125,8 @@ xfer_signal_upgrade_cb (void *data, const char *signal, const char *type_data,
void
xfer_create_directories ()
{
- char *weechat_dir, *dir1, *dir2;
+ const char *weechat_dir;
+ char *dir1, *dir2;
/* create download directory */
weechat_dir = weechat_info_get ("weechat_dir", "");
@@ -655,10 +656,11 @@ int
xfer_add_cb (void *data, const char *signal, const char *type_data, void *signal_data)
{
struct t_infolist *infolist;
- char *plugin_name, *plugin_id, *str_type, *str_protocol;
- char *remote_nick, *local_nick, *filename;
+ const char *plugin_name, *plugin_id, *str_type, *str_protocol;
+ const char *remote_nick, *local_nick, *filename;
int type, protocol;
- char *weechat_dir, *dir1, *dir2, *filename2, *short_filename, *pos;
+ const char *weechat_dir;
+ char *dir1, *dir2, *filename2, *short_filename, *pos;
int spaces, args, port_start, port_end;
struct stat st;
int sock, port;
@@ -1010,7 +1012,7 @@ xfer_start_resume_cb (void *data, const char *signal, const char *type_data,
{
struct t_infolist *infolist;
struct t_xfer *ptr_xfer;
- char *plugin_name, *plugin_id, *filename, *str_start_resume;
+ const char *plugin_name, *plugin_id, *filename, *str_start_resume;
int port;
unsigned long start_resume;
@@ -1090,7 +1092,7 @@ xfer_accept_resume_cb (void *data, const char *signal, const char *type_data,
{
struct t_infolist *infolist;
struct t_xfer *ptr_xfer;
- char *plugin_name, *plugin_id, *filename, *str_start_resume;
+ const char *plugin_name, *plugin_id, *filename, *str_start_resume;
int port;
unsigned long start_resume;