linting
This commit is contained in:
@@ -1066,7 +1066,8 @@ static lfs_stag_t lfs_dir_fetchmatch(lfs_t *lfs,
|
|||||||
|
|
||||||
// if either block address is invalid we return LFS_ERR_CORRUPT here,
|
// if either block address is invalid we return LFS_ERR_CORRUPT here,
|
||||||
// otherwise later writes to the pair could fail
|
// otherwise later writes to the pair could fail
|
||||||
if (lfs->block_count && (pair[0] >= lfs->block_count || pair[1] >= lfs->block_count)) {
|
if (lfs->block_count
|
||||||
|
&& (pair[0] >= lfs->block_count || pair[1] >= lfs->block_count)) {
|
||||||
return LFS_ERR_CORRUPT;
|
return LFS_ERR_CORRUPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5512,10 +5513,10 @@ static int lfs1_unmount(lfs_t *lfs) {
|
|||||||
/// v1 migration ///
|
/// v1 migration ///
|
||||||
static int lfs_rawmigrate(lfs_t *lfs, const struct lfs_config *cfg) {
|
static int lfs_rawmigrate(lfs_t *lfs, const struct lfs_config *cfg) {
|
||||||
struct lfs1 lfs1;
|
struct lfs1 lfs1;
|
||||||
if(cfg->block_count == 0){
|
|
||||||
// Indeterminate filesystem size not allowed for migration.
|
// Indeterminate filesystem size not allowed for migration.
|
||||||
return LFS_ERR_INVAL;
|
LFS_ASSERT(cfg->block_count != 0);
|
||||||
}
|
|
||||||
int err = lfs1_mount(lfs, &lfs1, cfg);
|
int err = lfs1_mount(lfs, &lfs1, cfg);
|
||||||
if (err) {
|
if (err) {
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
Reference in New Issue
Block a user