From ba320218245aeb11cb74c37ecf7132d0b9903957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 3 Jul 2014 17:03:31 +0200 Subject: [PATCH] bfs: fixed wrong key comparison in validator. * bplustree_header::DataType() is not compatible with the type constants compareKeys() expects. Use _CompareKeys() instead. --- src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp index 169c5b089e..639c7daa22 100644 --- a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2012, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2001-2014, Axel Dörfler, axeld@pinc-software.de. * This file may be used under the terms of the MIT License. * * Roughly based on 'btlib' written by Marcus J. Ranum - it shares @@ -2362,8 +2362,8 @@ BPlusTree::_ValidateChildren(TreeCheck& check, uint32 level, off_t offset, uint16 keyLength; uint8* key = parent->KeyAt(i, &keyLength); if (largestKey != NULL) { - int result = compareKeys(fHeader.DataType(), key, keyLength, - largestKey, largestKeyLength); + int result = _CompareKeys(key, keyLength, largestKey, + largestKeyLength); if (result >= 0) { dprintf("inode %" B_PRIdOFF ": node %" B_PRIdOFF " key %" B_PRIu32 " larger than it should!\n",