This is the mail archive of the newlib-cvs@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Cleanup macros in chacha_private.h to be target-type independent


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=19879c03c58f2a1f1d89e46ef4aa91034df37dd5

commit 19879c03c58f2a1f1d89e46ef4aa91034df37dd5
Author: Howland, Craig D <howland@LGSInnovations.com>
Date:   Fri Mar 18 18:18:15 2016 +0000

    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.

Diff:
---
 newlib/libc/stdlib/chacha_private.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/newlib/libc/stdlib/chacha_private.h b/newlib/libc/stdlib/chacha_private.h
index b48c981..0a3e38c 100644
--- a/newlib/libc/stdlib/chacha_private.h
+++ b/newlib/libc/stdlib/chacha_private.h
@@ -16,11 +16,8 @@ typedef struct
   u32 input[16]; /* could be compressed */
 } chacha_ctx;
 
-#define U8C(v) (v##U)
-#define U32C(v) (v##U)
-
-#define U8V(v) ((u8)(v) & U8C(0xFF))
-#define U32V(v) ((u32)(v) & U32C(0xFFFFFFFF))
+#define U8V(v) ((u8)(v))
+#define U32V(v) ((u32)(v))
 
 #define ROTL32(v, n) \
   (U32V((v) << (n)) | ((v) >> (32 - (n))))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]