From c698e13c0d3f8835581d1271371110da18827a92 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Sat, 28 May 2016 16:52:26 +1000 Subject: Couple of minor const correctness fixes --- src/common/plugin.c | 6 +++--- src/common/util.c | 2 +- src/common/util.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common') diff --git a/src/common/plugin.c b/src/common/plugin.c index be58f285..070b348b 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -426,14 +426,14 @@ plugin_auto_load_cb (char *filename) } } -static char * +static const char * plugin_get_libdir (void) { const char *libdir; libdir = g_getenv ("HEXCHAT_LIBDIR"); if (libdir && *libdir) - return (char*)libdir; + return libdir; else return HEXCHATLIBDIR; } @@ -441,7 +441,7 @@ plugin_get_libdir (void) void plugin_auto_load (session *sess) { - char *lib_dir; + const char *lib_dir; char *sub_dir; ps = sess; diff --git a/src/common/util.c b/src/common/util.c index 490c3cd2..bf1acb05 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -634,7 +634,7 @@ break_while: } void -for_files (char *dirname, char *mask, void callback (char *file)) +for_files (const char *dirname, const char *mask, void callback (char *file)) { GDir *dir; const gchar *entry_name; diff --git a/src/common/util.h b/src/common/util.h index bb377fc8..947b1a8a 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -41,7 +41,7 @@ char *expand_homedir (char *file); void path_part (char *file, char *path, int pathlen); int match (const char *mask, const char *string); char *file_part (char *file); -void for_files (char *dirname, char *mask, void callback (char *file)); +void for_files (const char *dirname, const char *mask, void callback (char *file)); int rfc_casecmp (const char *, const char *); int rfc_ncasecmp (char *, char *, int); int buf_get_line (char *, char **, int *, int len); -- cgit 1.4.1