Fixed CID 1300: the pointer last is never modified in the loop, so there is no
need for a null check. Or the null check needs to be moved to after last is initialized. But if the user_memcpy of cookie succeeds, last should not be null since it is just a copy of cookie. Probably. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27429 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -461,7 +461,7 @@ control_device_manager(const char* subsystem, uint32 function, void* buffer,
|
||||
NodeList::ConstIterator iterator = last->Parent()->Children().GetIterator();
|
||||
|
||||
// skip those we already traversed
|
||||
while (iterator.HasNext() && last != NULL) {
|
||||
while (iterator.HasNext()) {
|
||||
device_node* node = iterator.Next();
|
||||
|
||||
if (node == last)
|
||||
|
||||
Reference in New Issue
Block a user