mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 22:16:21 +00:00
get_log_file_location () should return const char*
Make clear that result should never be freed.
This commit is contained in:
@@ -6320,7 +6320,7 @@ cmd_log(ProfWin *window, const char *const command, gchar **args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(subcmd, "where") == 0) {
|
if (strcmp(subcmd, "where") == 0) {
|
||||||
char *logfile = get_log_file_location();
|
const char *logfile = get_log_file_location();
|
||||||
cons_show("Log file: %s", logfile);
|
cons_show("Log file: %s", logfile);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ log_reinit(void)
|
|||||||
free(lf);
|
free(lf);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
const char*
|
||||||
get_log_file_location(void)
|
get_log_file_location(void)
|
||||||
{
|
{
|
||||||
return mainlogfile->str;
|
return mainlogfile->str;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ void log_init(log_level_t filter, char *log_file);
|
|||||||
log_level_t log_get_filter(void);
|
log_level_t log_get_filter(void);
|
||||||
void log_close(void);
|
void log_close(void);
|
||||||
void log_reinit(void);
|
void log_reinit(void);
|
||||||
char* get_log_file_location(void);
|
const char* get_log_file_location(void);
|
||||||
void log_debug(const char *const msg, ...);
|
void log_debug(const char *const msg, ...);
|
||||||
void log_info(const char *const msg, ...);
|
void log_info(const char *const msg, ...);
|
||||||
void log_warning(const char *const msg, ...);
|
void log_warning(const char *const msg, ...);
|
||||||
|
|||||||
Reference in New Issue
Block a user