Using LFS_ASSERT instead of an runtime check.
Remove NULL check from condition and assert callback is valid.
This commit is contained in:
committed by
Christopher Haster
parent
2311cd785a
commit
fd5e7f6253
@@ -1290,7 +1290,8 @@ static lfs_stag_t lfs_dir_fetchmatch(lfs_t *lfs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// found a match for our fetcher?
|
// found a match for our fetcher?
|
||||||
if ((fmask & tag) == (fmask & ftag) && (cb != NULL)) {
|
if ((fmask & tag) == (fmask & ftag)) {
|
||||||
|
LFS_ASSERT(cb != NULL);
|
||||||
int res = cb(data, tag, &(struct lfs_diskoff){
|
int res = cb(data, tag, &(struct lfs_diskoff){
|
||||||
dir->pair[0], off+sizeof(tag)});
|
dir->pair[0], off+sizeof(tag)});
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user