gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 04/07: mhd_bithelpers: unified _MHD_ROTx32() behavior


From: gnunet
Subject: [libmicrohttpd] 04/07: mhd_bithelpers: unified _MHD_ROTx32() behavior
Date: Sun, 31 Oct 2021 17:02:46 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit ed87ddd2179729fd1676610d80c2dce6c53f24ea
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Oct 31 18:40:39 2021 +0300

    mhd_bithelpers: unified _MHD_ROTx32() behavior
---
 src/microhttpd/mhd_bithelpers.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/mhd_bithelpers.h b/src/microhttpd/mhd_bithelpers.h
index 8f7058a8..ed0c2e0c 100644
--- a/src/microhttpd/mhd_bithelpers.h
+++ b/src/microhttpd/mhd_bithelpers.h
@@ -33,7 +33,6 @@
 /* Declarations for VC & Clang/C2 built-ins */
 #include <intrin.h>
 #endif /* _MSC_FULL_VER  */
-#include "mhd_assert.h"
 #include "mhd_byteorder.h"
 #if _MHD_BYTE_ORDER == _MHD_LITTLE_ENDIAN || _MHD_BYTE_ORDER == _MHD_BIG_ENDIAN
 #include "mhd_align.h"
@@ -293,7 +292,7 @@ _MHD_PUT_64BIT_BE_SAFE (void *dst, uint64_t value)
 _MHD_static_inline uint32_t
 _MHD_ROTR32 (uint32_t value32, int bits)
 {
-  mhd_assert (bits < 32);
+  bits %= 32;
   /* Defined in form which modern compiler could optimize. */
   return (value32 >> bits) | (value32 << (32 - bits));
 }
@@ -321,7 +320,7 @@ _MHD_ROTR32 (uint32_t value32, int bits)
 _MHD_static_inline uint32_t
 _MHD_ROTL32 (uint32_t value32, int bits)
 {
-  mhd_assert (bits < 32);
+  bits %= 32;
   /* Defined in form which modern compiler could optimize. */
   return (value32 << bits) | (value32 >> (32 - bits));
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]