From 0f3a576f7ef58b52f57b28a7fc48fe7a0d99313a Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Fri, 12 Sep 2008 04:40:37 +0000 Subject: [PATCH] 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 --- src/system/kernel/device_manager/device_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/device_manager/device_manager.cpp b/src/system/kernel/device_manager/device_manager.cpp index 0e3c888833..cf8dfde518 100644 --- a/src/system/kernel/device_manager/device_manager.cpp +++ b/src/system/kernel/device_manager/device_manager.cpp @@ -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)