gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: mhd_bithelpers: fixed handling of


From: gnunet
Subject: [libmicrohttpd] branch master updated: mhd_bithelpers: fixed handling of zero bits rotate
Date: Fri, 06 May 2022 13:07:04 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 171e6d05 mhd_bithelpers: fixed handling of zero bits rotate
171e6d05 is described below

commit 171e6d0591b0c81c6999a9e0d8f65b5624a76f15
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri May 6 14:06:52 2022 +0300

    mhd_bithelpers: fixed handling of zero bits rotate
---
 src/microhttpd/mhd_bithelpers.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/microhttpd/mhd_bithelpers.h b/src/microhttpd/mhd_bithelpers.h
index eddd67f0..5cfcc846 100644
--- a/src/microhttpd/mhd_bithelpers.h
+++ b/src/microhttpd/mhd_bithelpers.h
@@ -294,6 +294,8 @@ _MHD_static_inline uint32_t
 _MHD_ROTR32 (uint32_t value32, int bits)
 {
   bits %= 32;
+  if (0 == bits)
+    return value32;
   /* Defined in form which modern compiler could optimize. */
   return (value32 >> bits) | (value32 << (32 - bits));
 }
@@ -322,6 +324,8 @@ _MHD_static_inline uint32_t
 _MHD_ROTL32 (uint32_t value32, int bits)
 {
   bits %= 32;
+  if (0 == bits)
+    return value32;
   /* 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]