Remove unused checked_read state flag
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run

This commit is contained in:
Andrea Mazzoleni 2026-10-18 11:23:04 +02:00
parent a0d6bc288a
commit 8a5b2adb75
2 changed files with 0 additions and 6 deletions

View file

@ -171,7 +171,6 @@ void state_init(struct snapraid_state* state)
state->autosave = 0;
state->need_write = 0;
state->written = 0;
state->checked_read = 0;
state->block_size = 256 * KIBI; /* default 256 KiB */
state->raid_mode = RAID_MODE_CAUCHY_RAID;
state->file_mode = ADVISE_DEFAULT;
@ -5423,9 +5422,6 @@ void state_read(struct snapraid_state* state)
log_tag("content_info:read_unixtime:%" PRId64 "\n", (int64_t)st.st_mtime);
}
log_flush();
/* mark that we read the content file, and it passed all the checks */
state->checked_read = 1;
}
/**
@ -5967,7 +5963,6 @@ void state_write(struct snapraid_state* state)
log_flush();
state->need_write = 0; /* no write needed anymore */
state->checked_read = 0; /* what we wrote is not checked in read */
state->written = 1;
}

View file

@ -130,7 +130,6 @@ struct snapraid_state {
uint64_t autosave; /**< Autosave after the specified amount of data. 0 to disable. */
int need_write; /**< If the state is changed. */
int written; /**< If the state was written at least one time */
int checked_read; /**< If the state was read and checked. */
uint32_t block_size; /**< Block size in bytes. */
unsigned raid_mode; /**< Raid mode to use. RAID_MODE_DEFAULT or RAID_MODE_ALTERNATE. */
int file_mode; /**< File access mode. Combination of ADVISE_* flags. */