mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 15:10:26 +09:00
yaffs2: iterator variable cannot be NULL
The iterator of list_for_each() is never NULL. Identified with coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
c9bf43dd9d
commit
428e60e079
@ -1872,8 +1872,8 @@ static int yaffs_new_obj_id(struct yaffs_dev *dev)
|
|||||||
n += YAFFS_NOBJECT_BUCKETS;
|
n += YAFFS_NOBJECT_BUCKETS;
|
||||||
list_for_each(i, &dev->obj_bucket[bucket].list) {
|
list_for_each(i, &dev->obj_bucket[bucket].list) {
|
||||||
/* If there is already one in the list */
|
/* If there is already one in the list */
|
||||||
if (i && list_entry(i, struct yaffs_obj,
|
if (list_entry(i, struct yaffs_obj,
|
||||||
hash_link)->obj_id == n) {
|
hash_link)->obj_id == n) {
|
||||||
found = 0;
|
found = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2847,12 +2847,9 @@ static void yaffsfs_RemoveObjectCallback(struct yaffs_obj *obj)
|
|||||||
* the next one to prevent a hanging ptr.
|
* the next one to prevent a hanging ptr.
|
||||||
*/
|
*/
|
||||||
list_for_each(i, &search_contexts) {
|
list_for_each(i, &search_contexts) {
|
||||||
if (i) {
|
dsc = list_entry(i, struct yaffsfs_DirSearchContxt, others);
|
||||||
dsc = list_entry(i, struct yaffsfs_DirSearchContxt,
|
if (dsc->nextReturn == obj)
|
||||||
others);
|
yaffsfs_DirAdvance(dsc);
|
||||||
if (dsc->nextReturn == obj)
|
|
||||||
yaffsfs_DirAdvance(dsc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user