You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
810 B

  1. From 6ef69a26126ee4e69a25392fd456b8a66c51dffd Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Tue, 15 Nov 2016 02:46:55 +0000
  4. Subject: [PATCH] Fix errors found by clang
  5. Fixes errors like
  6. ../../git/src/hash.cpp:282:19: error: ordered comparison between pointer and zero ('const unsigned char *' and 'int')
  7. if(fdht->base>0){
  8. ~~~~~~~~~~^~
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. src/hash.cpp | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. --- a/src/hash.cpp
  14. +++ b/src/hash.cpp
  15. @@ -279,7 +279,7 @@ void file_data_hasher_t::hash()
  16. MAP_FILE|
  17. #endif
  18. MAP_SHARED,fd,0);
  19. - if(fdht->base>0){
  20. + if(fdht->base != (void *) -1){
  21. /* mmap is successful, so set the bounds.
  22. * if it is not successful, we default to reading the fd
  23. */