This commit is contained in:
刘可亮
2024-10-30 16:50:31 +08:00
parent 0ef85b55da
commit 661e71562d
458 changed files with 46555 additions and 12133 deletions

View File

@@ -5266,6 +5266,19 @@ cleanup:
#endif
#ifdef RT_DEBUG
static bool lfs_mlist_isopen(struct lfs_mlist *head,
struct lfs_mlist *node)
{
for (struct lfs_mlist **p = &head; *p; p = &(*p)->next) {
if (*p == (struct lfs_mlist*)node) {
return true;
}
}
return false;
}
#endif
/// Public API wrappers ///

View File

@@ -51,20 +51,8 @@ extern "C"
#endif
// Runtime assertions
#if !defined(LFS_NO_ASSERT) && defined(RT_DEBUG)
#ifndef LFS_NO_ASSERT
#define LFS_ASSERT(test) RT_ASSERT(test)
static bool lfs_mlist_isopen(struct lfs_mlist *head,
struct lfs_mlist *node) {
for (struct lfs_mlist **p = &head; *p; p = &(*p)->next) {
if (*p == (struct lfs_mlist*)node) {
return true;
}
}
return false;
}
#else
#define LFS_ASSERT(test)
#endif