]> git.ipfire.org Git - location/libloc.git/blobdiff - src/test-as.c
Fix reading database in newer version
[location/libloc.git] / src / test-as.c
index 5357d53b54b5b75041333d43f300cc0baa5396a9..7f0da750580f4ebc7dd7eb4f67b18d9a694ef07c 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, char** argv) {
 
        // Create a database
        struct loc_writer* writer;
-       err = loc_writer_new(ctx, &writer, LOC_DATABASE_VERSION_LATEST, NULL);
+       err = loc_writer_new(ctx, &writer, NULL);
        if (err < 0)
                exit(EXIT_FAILURE);
 
@@ -55,7 +55,7 @@ int main(int argc, char** argv) {
                exit(EXIT_FAILURE);
        }
 
-       err = loc_writer_write(writer, f);
+       err = loc_writer_write(writer, f, LOC_DATABASE_VERSION_UNSET);
        if (err) {
                fprintf(stderr, "Could not write database: %s\n", strerror(-err));
                exit(EXIT_FAILURE);