mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 10:26:10 +01:00 
			
		
		
		
	efi_selftest: efi_st_memcmp return difference of bytes
If the memory regions are different efi_st_memcmp currently returns the difference of the addresses. Insted the difference of the first differing byte pair should be returned. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
		
				
					committed by
					
						 Alexander Graf
						Alexander Graf
					
				
			
			
				
	
			
			
			
						parent
						
							5ca23ed5bc
						
					
				
				
					commit
					c155dfeb1e
				
			| @@ -17,7 +17,7 @@ int efi_st_memcmp(const void *buf1, const void *buf2, size_t length) | |||||||
|  |  | ||||||
| 	for (; length; --length) { | 	for (; length; --length) { | ||||||
| 		if (*pos1 != *pos2) | 		if (*pos1 != *pos2) | ||||||
| 			return pos1 - pos2; | 			return *pos1 - *pos2; | ||||||
| 		++pos1; | 		++pos1; | ||||||
| 		++pos2; | 		++pos2; | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user