diff --git a/include/core/file.h b/include/core/file.h index 2aa61051..5c3c50eb 100644 --- a/include/core/file.h +++ b/include/core/file.h @@ -60,13 +60,6 @@ struct cache_file { gchar *cf_subdir; /* The cache file's subdirectory. */ }; -#define CACHE_FILE_INIT(cfsubdir, cfname) \ - { \ - .cf_file = NULL, \ - .cf_subdir = cfsubdir, \ - .cf_name = cfname, \ - } - /* Initialize a new file object. */ void file_init(struct file *, const gchar *, unsigned int); void cache_file_init(struct cache_file *, gchar *, gchar *); diff --git a/tests/core/file.c b/tests/core/file.c index 7f653096..e9b13080 100644 --- a/tests/core/file.c +++ b/tests/core/file.c @@ -171,9 +171,11 @@ static void test_versioning_new() static void test_cache() { - struct cache_file file = CACHE_FILE_INIT("dir", "file.txt"); - struct cache_file copy = CACHE_FILE_INIT("dir", "copy.txt"); gchar *basepath, *filepath, *writepath; + struct cache_file file, copy; + + cache_file_init(&file, "dir", "file.txt"); + cache_file_init(©, "dir", "copy.txt"); basepath = g_strjoin("/", g_get_user_cache_dir(), OCARINA_NAME, NULL); filepath = g_strjoin("/", basepath, "dir", "file.txt", NULL);