summaryrefslogtreecommitdiff
path: root/security/md5deep/files/patch-src_hash.cpp
blob: e0f9eff808dedf844c0da9ecabff847647bca911 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/hash.cpp.orig	2014-01-29 18:40:39 UTC
+++ src/hash.cpp
@@ -124,7 +124,7 @@ bool file_data_hasher_t::compute_hash(ui
     
 	// If an error occured, display a message and see if we need to quit.
 	if ((current_read_bytes<0) || (this->handle && ferror(this->handle))){
-	    ocb->error_filename(this->file_name,"error at offset %"PRIu64": %s",
+	    ocb->error_filename(this->file_name,"error at offset %" PRIu64": %s",
 				request_start, strerror(errno));
 	   
 	    if (file_fatal_error()){
@@ -279,7 +279,7 @@ void file_data_hasher_t::hash()
 		MAP_FILE|
 #endif
 		MAP_SHARED,fd,0);
-	    if(fdht->base>0){		
+	    if(fdht->base != nullptr){		
 		/* mmap is successful, so set the bounds.
 		 * if it is not successful, we default to reading the fd
 		 */