diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-05-14 21:29:40 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-05-14 21:29:40 (GMT) |
commit | 7358dc2001d27d3c5a0c0fe39288b1a310a6d89e (patch) | |
tree | c83f3d52b11c72336dbabc4c1448c2ca4a375a36 /src/common/xdg.c | |
parent | ed57185faa4d7a53d953cf74a6f8626f44ce9b75 (diff) |
Restore a minimal support for plugins.
Diffstat (limited to 'src/common/xdg.c')
-rw-r--r-- | src/common/xdg.c | 5 |
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); |