]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/test-country.c
Bump database version to "1"
[people/ms/libloc.git] / src / test-country.c
index 2f2bd986cc106b6b450ee279d964917c9a365b38..030e78edf3f356a25ff2a455b026bb38347c189a 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char** argv) {
 
        // Create a database
        struct loc_writer* writer;
-       err = loc_writer_new(ctx, &writer);
+       err = loc_writer_new(ctx, &writer, LOC_DATABASE_VERSION_LATEST, NULL);
        if (err < 0)
                exit(EXIT_FAILURE);
 
@@ -75,7 +75,7 @@ int main(int argc, char** argv) {
        }
        loc_country_unref(country);
 
-       FILE* f = fopen("test.db", "w");
+       FILE* f = fopen("test.db", "w+");
        if (!f) {
                fprintf(stderr, "Could not open file for writing: %s\n", strerror(errno));
                exit(EXIT_FAILURE);