Cleanup macros in chacha_private.h to be target-type independent
* libc/stdlib/chacha_private.h (U8C, U32C): Remove un-necessary macros. (U8V, U32V): Drop masking.
This commit is contained in:
		
				
					committed by
					
						 Corinna Vinschen
						Corinna Vinschen
					
				
			
			
				
	
			
			
			
						parent
						
							8e2b2adb3d
						
					
				
				
					commit
					19879c03c5
				
			| @@ -16,11 +16,8 @@ typedef struct | |||||||
|   u32 input[16]; /* could be compressed */ |   u32 input[16]; /* could be compressed */ | ||||||
| } chacha_ctx; | } chacha_ctx; | ||||||
|  |  | ||||||
| #define U8C(v) (v##U) | #define U8V(v) ((u8)(v)) | ||||||
| #define U32C(v) (v##U) | #define U32V(v) ((u32)(v)) | ||||||
|  |  | ||||||
| #define U8V(v) ((u8)(v) & U8C(0xFF)) |  | ||||||
| #define U32V(v) ((u32)(v) & U32C(0xFFFFFFFF)) |  | ||||||
|  |  | ||||||
| #define ROTL32(v, n) \ | #define ROTL32(v, n) \ | ||||||
|   (U32V((v) << (n)) | ((v) >> (32 - (n)))) |   (U32V((v) << (n)) | ((v) >> (32 - (n)))) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user