From b7ea3ef1c733ca3b6acffd96f18cb195340d0b34 Mon Sep 17 00:00:00 2001 From: Timoshenko Date: Fri, 9 Aug 2024 16:55:39 -0300 Subject: [PATCH] Update hash.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just to solve this issue: hash.cpp: In member function ‘void file_data_hasher_t::hash()’: hash.cpp:282:26: error: ordered comparison of pointer with integer zero (‘const unsigned char*’ and ‘int’) 282 | if(fdht->base>0){ | ~~~~~~~~~~^~ --- src/hash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hash.cpp b/src/hash.cpp index 52f419b0c..af0896f73 100644 --- a/src/hash.cpp +++ b/src/hash.cpp @@ -279,7 +279,7 @@ void file_data_hasher_t::hash() MAP_FILE| #endif MAP_SHARED,fd,0); - if(fdht->base != (void *) -1){ + if (fdht->base != nullptr) { /* mmap is successful, so set the bounds. * if it is not successful, we default to reading the fd */