Couple of minor const correctness fixes

This commit is contained in:
Erik de Castro Lopo 2016-05-28 16:52:26 +10:00
parent 10e429b85d
commit c698e13c0d
3 changed files with 5 additions and 5 deletions

View File

@ -426,14 +426,14 @@ plugin_auto_load_cb (char *filename)
} }
} }
static char * static const char *
plugin_get_libdir (void) plugin_get_libdir (void)
{ {
const char *libdir; const char *libdir;
libdir = g_getenv ("HEXCHAT_LIBDIR"); libdir = g_getenv ("HEXCHAT_LIBDIR");
if (libdir && *libdir) if (libdir && *libdir)
return (char*)libdir; return libdir;
else else
return HEXCHATLIBDIR; return HEXCHATLIBDIR;
} }
@ -441,7 +441,7 @@ plugin_get_libdir (void)
void void
plugin_auto_load (session *sess) plugin_auto_load (session *sess)
{ {
char *lib_dir; const char *lib_dir;
char *sub_dir; char *sub_dir;
ps = sess; ps = sess;

View File

@ -634,7 +634,7 @@ break_while:
} }
void 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; GDir *dir;
const gchar *entry_name; const gchar *entry_name;

View File

@ -41,7 +41,7 @@ char *expand_homedir (char *file);
void path_part (char *file, char *path, int pathlen); void path_part (char *file, char *path, int pathlen);
int match (const char *mask, const char *string); int match (const char *mask, const char *string);
char *file_part (char *file); 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_casecmp (const char *, const char *);
int rfc_ncasecmp (char *, char *, int); int rfc_ncasecmp (char *, char *, int);
int buf_get_line (char *, char **, int *, int len); int buf_get_line (char *, char **, int *, int len);