mirror of https://github.com/aria2/aria2
				
				
				
			Use cached filesize instead of calling size() again
							parent
							
								
									3974c1223b
								
							
						
					
					
						commit
						dfadc2e68b
					
				| 
						 | 
				
			
			@ -380,7 +380,7 @@ void AbstractDiskWriter::ensureMmapWrite(size_t len, int64_t offset)
 | 
			
		|||
        }
 | 
			
		||||
#else // !__MINGW32__
 | 
			
		||||
        mapaddr_ = reinterpret_cast<unsigned char*>
 | 
			
		||||
          (mmap(nullptr, size(), PROT_READ | PROT_WRITE, MAP_SHARED, fd_, 0));
 | 
			
		||||
          (mmap(nullptr, filesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, 0));
 | 
			
		||||
        if(!mapaddr_) {
 | 
			
		||||
          errNum = errno;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue