mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
less strdup()+free()
Improvement of f8ff93234e
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
parent
095d40d3bd
commit
25e56fb494
@ -180,13 +180,10 @@ log_init(log_level_t filter, char* log_file)
|
||||
user_provided_log = TRUE;
|
||||
}
|
||||
|
||||
gchar* lf = files_get_log_file(log_file);
|
||||
mainlogfile = files_get_log_file(log_file);
|
||||
|
||||
logp = fopen(lf, "a");
|
||||
g_chmod(lf, S_IRUSR | S_IWUSR);
|
||||
mainlogfile = g_strdup(lf);
|
||||
|
||||
g_free(lf);
|
||||
logp = fopen(mainlogfile, "a");
|
||||
g_chmod(mainlogfile, S_IRUSR | S_IWUSR);
|
||||
}
|
||||
|
||||
const char*
|
||||
|
Loading…
Reference in New Issue
Block a user