From 1e3d4cf78c5cf43273005bf6410af2ba01e7ce8a Mon Sep 17 00:00:00 2001 From: X512 Date: Sun, 22 Mar 2020 11:26:44 +0900 Subject: [PATCH] Kernel: remove dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit area->name is a fixed array inside struct, not pointer, so it should be never be NULL. Pointed by clang. Change-Id: Ic8930450cb8461eef158bc854f214eb47d92ce22 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2391 Reviewed-by: Jérôme Duval --- src/system/kernel/vm/vm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 3597f6f604..f182ab53b4 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -3361,7 +3361,7 @@ dump_area(int argc, char** argv) VMAreaHashTable::Iterator it = VMAreaHash::GetIterator(); while ((area = it.Next()) != NULL) { - if (((mode & 4) != 0 && area->name != NULL + if (((mode & 4) != 0 && !strcmp(argv[index], area->name)) || (num != 0 && (((mode & 1) != 0 && (addr_t)area->id == num) || (((mode & 2) != 0 && area->Base() <= num