File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -385,10 +385,8 @@ pub const unsafe fn dirent_const_time_strlen(dirent: *const libc::dirent64) -> u
385385    // the non-name bytes (d_type and padding) to avoid false null detection. 
386386    // The 0x00FF_FFFF mask preserves only the 3 bytes where the name could start. 
387387    // Branchless masking: avoids branching by using a mask that is either 0 or 0x00FF_FFFF 
388-     unsafe { std:: hint:: assert_unchecked ( reclen % 8  ==0  && reclen >=24  ) } ;  //tell the compiler is a multiple of 8 and within bounds 
389-     //this is safe because the kernel guarantees the above. 
390388    //............................//special case short name check 
391-     let  mask = 0x00FF_FFFFu64  *  ( ( reclen ==24 )  as  u64 ) ;  // (multiply by 0 or 1) 
389+     let  mask = 0x00FF_FFFFu64  *  ( ( reclen ==24 )  as  u64 ) ;  // (multiply by 0 or 1)   
392390    // The mask is applied to the last word to isolate the relevant bytes. 
393391    // The last word is masked to isolate the relevant bytes, 
394392    //we're bit manipulating the last word (a byte/u64) to find the first null byte 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments