static URET do_FlushObject(uffs_Object *obj) { uffs_Device *dev; URET ret = U_SUCC; dev = obj->dev; if (obj->node) { if (obj->type == UFFS_TYPE_DIR) ret = uffs_BufFlushGroup(dev, obj->node->u.dir.parent, obj->node->u.dir.serial); else { ret = ( uffs_BufFlushGroupMatchParent(dev, obj->node->u.file.serial) == U_SUCC && uffs_BufFlushGroup(dev, obj->node->u.file.parent, obj->node->u.file.serial) == U_SUCC ) ? U_SUCC : U_FAIL; } } return ret; }
static URET do_FlushObject(uffs_Object *obj) { uffs_Device *dev; URET ret = U_SUCC; TreeNode *node = NULL; dev = obj->dev; if (obj->node) { node = obj->node; if (obj->type == UFFS_TYPE_DIR) ret = uffs_BufFlushGroup(dev, obj->node->u.dir.parent, obj->node->u.dir.serial); else { ret = ( uffs_BufFlushGroupMatchParent(dev, obj->node->u.file.serial) == U_SUCC && uffs_BufFlushGroup(dev, obj->node->u.file.parent, obj->node->u.file.serial) == U_SUCC ) ? U_SUCC : U_FAIL; } uffs_Assert(node == obj->node, "obj->node change!\n"); } return ret; }