mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-20 13:16:36 +02:00
enforce const correctess, fix undefined behaviour with string literals
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
extern struct user_settings *user_settings_;
|
||||
|
||||
/* Creates/fetches log file by appending to the config dir the name and a pseudo-unique identity */
|
||||
void init_logging_session(char *name, char *key, struct chatlog *log)
|
||||
void init_logging_session(char *name, const char *key, struct chatlog *log)
|
||||
{
|
||||
if (!log->log_on)
|
||||
return;
|
||||
@ -80,7 +80,7 @@ void init_logging_session(char *name, char *key, struct chatlog *log)
|
||||
fprintf(log->file, "\n*** NEW SESSION ***\n\n");
|
||||
}
|
||||
|
||||
void write_to_log(const char *msg, char *name, struct chatlog *log, bool event)
|
||||
void write_to_log(const char *msg, const char *name, struct chatlog *log, bool event)
|
||||
{
|
||||
if (!log->log_on)
|
||||
return;
|
||||
@ -110,7 +110,7 @@ void write_to_log(const char *msg, char *name, struct chatlog *log, bool event)
|
||||
}
|
||||
}
|
||||
|
||||
void log_enable(char *name, char *key, struct chatlog *log)
|
||||
void log_enable(char *name, const char *key, struct chatlog *log)
|
||||
{
|
||||
log->log_on = true;
|
||||
|
||||
|
Reference in New Issue
Block a user