From 8cc3c74406b4b4c4b687fa85f6a5c56989743a56 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 29 Jul 2008 01:52:20 +0000 Subject: [PATCH] The "cvar" command wasn't happy with private condition variables. Now we don't check any longer whether the given number is the address of a condition variable in the global hash table; we just assume it is a valid condition variable pointer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26674 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/condition_variable.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/system/kernel/condition_variable.cpp b/src/system/kernel/condition_variable.cpp index 1d29fc38e4..5c47711e3b 100644 --- a/src/system/kernel/condition_variable.cpp +++ b/src/system/kernel/condition_variable.cpp @@ -66,15 +66,8 @@ dump_condition_variable(int argc, char** argv) ConditionVariable* variable = sConditionVariableHash.Lookup((void*)address); if (variable == NULL) { - // It might be a direct pointer to a condition variable. Search the - // hash. - ConditionVariableHash::Iterator it(&sConditionVariableHash); - while (ConditionVariable* hashVariable = it.Next()) { - if (hashVariable == (void*)address) { - variable = hashVariable; - break; - } - } + // It must be a direct pointer to a condition variable. + variable = (ConditionVariable*)address; } if (variable != NULL) {