summaryrefslogtreecommitdiff
path: root/src/common/xdg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/xdg.c')
-rw-r--r--src/common/xdg.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/xdg.c b/src/common/xdg.c
index 23feeb9..cabff75 100644
--- a/src/common/xdg.c
+++ b/src/common/xdg.c
@@ -79,7 +79,7 @@ char *get_xdg_config_dir(const char *suffix)
if (strcmp(entry->d_name, ".") == 0) continue;
if (strcmp(entry->d_name, "..") == 0) continue;
- result = (char *)calloc(strlen(env) + 2 + strlen(suffix) + 1, sizeof(char));
+ result = calloc(strlen(env) + 2 + strlen(suffix) + 1, sizeof(char));
strcpy(result, env);
if (env[strlen(env) - 1] != G_DIR_SEPARATOR)
@@ -101,8 +101,7 @@ char *get_xdg_config_dir(const char *suffix)
env = getenv("HOME");
if (env == NULL || env[0] == '\0') return NULL;
- result = (char *)calloc(strlen(env) + 1 + strlen(".config" G_DIR_SEPARATOR_S)
- + strlen(suffix) + 1, sizeof(char));
+ result = calloc(strlen(env) + 1 + strlen(".config" G_DIR_SEPARATOR_S) + strlen(suffix) + 1, sizeof(char));
strcpy(result, env);