]> git.tuebingen.mpg.de Git - osl.git/blobdiff - fsck.c
Change type of struct osl_table_description->flags to uint8_t.
[osl.git] / fsck.c
diff --git a/fsck.c b/fsck.c
index 29c4e2c7dc9d72d940dbb7c4298f24d84f3dcfc8..27004a65694131b020d527177a9269ec2711f2ed 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -754,7 +754,7 @@ static unsigned files_pruned;
 int prune_disk_storage_file(const char *path, void *private_data)
 {
        HASH_TYPE hash[HASH_SIZE];
-       unsigned flags = *(unsigned *)private_data;
+       uint8_t flags = *(uint8_t *)private_data;
        struct osl_object obj = {.data = hash, .size = HASH_SIZE};
        struct osl_row *row;
        int ret = -1;
@@ -811,8 +811,9 @@ static int prune_disk_storage_files(struct osl_table *t)
        INFO_LOG("looking for unreferenced disk storage files\n");
        FOR_EACH_DISK_STORAGE_COLUMN(i, t, cd) {
                char *dirname = column_filename(t, i);
+               uint8_t flags = t->desc->flags;
                ret = for_each_file_in_dir(dirname, prune_disk_storage_file,
-                       (unsigned *)&t->desc->flags);
+                       &flags);
                free(dirname);
        }
        if (files_pruned)