summaryrefslogtreecommitdiff
path: root/src/common/xdg.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2024-05-14 21:29:40 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2024-05-14 21:29:40 (GMT)
commit7358dc2001d27d3c5a0c0fe39288b1a310a6d89e (patch)
treec83f3d52b11c72336dbabc4c1448c2ca4a375a36 /src/common/xdg.c
parented57185faa4d7a53d953cf74a6f8626f44ce9b75 (diff)
Restore a minimal support for plugins.
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);