summaryrefslogtreecommitdiff
path: root/src/core/log.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2017-07-28 03:56:02 +0100
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2017-07-28 03:56:02 +0100
commite08e2bd87aceafc2a34d72ca3fd362f2f2ea90eb (patch)
tree4257e57b560f448190a37f93ef3bf7392c448509 /src/core/log.c
parent437fbef6eb8f605320841cba119d3abbb3571a75 (diff)
downloadirssi-e08e2bd87aceafc2a34d72ca3fd362f2f2ea90eb.zip
Don't compute log_dir_create_mode in three different places.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Diffstat (limited to 'src/core/log.c')
-rw-r--r--src/core/log.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/log.c b/src/core/log.c
index 6af1effc..cee1dab5 100644
--- a/src/core/log.c
+++ b/src/core/log.c
@@ -33,6 +33,8 @@
#define DEFAULT_LOG_FILE_CREATE_MODE 600
GSList *logs;
+int log_file_create_mode;
+int log_dir_create_mode;
static const char *log_item_types[] = {
"target",
@@ -42,8 +44,6 @@ static const char *log_item_types[] = {
};
static char *log_timestamp;
-static int log_file_create_mode;
-static int log_dir_create_mode;
static int rotate_tag;
static int log_item_str2type(const char *type)
@@ -562,7 +562,6 @@ static void read_settings(void)
log_timestamp = g_strdup(settings_get_str("log_timestamp"));
log_file_create_mode = octal2dec(settings_get_int("log_create_mode"));
-
log_dir_create_mode = log_file_create_mode;
if (log_file_create_mode & 0400) log_dir_create_mode |= 0100;
if (log_file_create_mode & 0040) log_dir_create_mode |= 0010;