Mercurial > pidgin
changeset 10332:8d42237564f6
[gaim-migrate @ 11539]
Two util functions were only half-const
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 09 Dec 2004 01:08:14 +0000 |
parents | 20df7dd1c57c |
children | 5eb81f349da7 |
files | src/blist.c src/gtkmain.c src/util.c src/util.h |
diffstat | 4 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blist.c Thu Dec 09 00:44:58 2004 +0000 +++ b/src/blist.c Thu Dec 09 01:08:14 2004 +0000 @@ -2048,7 +2048,7 @@ void gaim_blist_load() { - char *user_dir = gaim_user_dir(); + const char *user_dir = gaim_user_dir(); char *filename; char *msg; @@ -2390,7 +2390,7 @@ void gaim_blist_sync() { FILE *file; - char *user_dir = gaim_user_dir(); + const char *user_dir = gaim_user_dir(); char *filename; char *filename_real;
--- a/src/gtkmain.c Thu Dec 09 00:44:58 2004 +0000 +++ b/src/gtkmain.c Thu Dec 09 01:08:14 2004 +0000 @@ -605,7 +605,7 @@ gaim_debug_set_enabled(debug_enabled); plugin_search_paths[0] = g_strdup(LIBDIR); - plugin_search_paths[1] = gaim_user_dir(); + plugin_search_paths[1] = g_strdup(gaim_user_dir()); plugin_search_paths[2] = g_build_filename(gaim_user_dir(), "plugins", NULL); gaim_plugins_set_search_paths(sizeof(plugin_search_paths) / @@ -613,6 +613,7 @@ plugin_search_paths); g_free(plugin_search_paths[0]); + g_free(plugin_search_paths[1]); g_free(plugin_search_paths[2]); gaim_plugins_probe(NULL);
--- a/src/util.c Thu Dec 09 00:44:58 2004 +0000 +++ b/src/util.c Thu Dec 09 01:08:14 2004 +0000 @@ -1861,7 +1861,7 @@ /* returns a string of the form ~/.gaim, where ~ is replaced by the user's home * dir. Note that there is no trailing slash after .gaim. */ -char * +const char * gaim_user_dir(void) { if (custom_home_dir != NULL && strlen(custom_home_dir) > 0) {
--- a/src/util.h Thu Dec 09 00:44:58 2004 +0000 +++ b/src/util.h Thu Dec 09 01:08:14 2004 +0000 @@ -356,7 +356,7 @@ * * @see gaim_home_dir() */ -char *gaim_user_dir(void); +const char *gaim_user_dir(void); /** * Define a custom gaim settings directory, overriding the default (user's home directory/.gaim)