gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 12/156: MHD_get_version(): fixed signed value bit shift


From: gnunet
Subject: [libmicrohttpd] 12/156: MHD_get_version(): fixed signed value bit shift
Date: Sun, 28 May 2023 17:51:05 +0200

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

karlson2k pushed a commit to tag v0.9.77
in repository libmicrohttpd.

commit f0a68628e96b0861e2201c367e072c571af05408
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Apr 18 11:00:05 2022 +0300

    MHD_get_version(): fixed signed value bit shift
---
 src/microhttpd/daemon.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 5ca612ea..3d6c6a84 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -7924,11 +7924,11 @@ MHD_get_version (void)
     int res = MHD_snprintf_ (ver,
                              sizeof(ver),
                              "%x.%x.%x",
-                             (((int) MHD_VERSION >> 24) & 0xFF),
-                             (((int) MHD_VERSION >> 16) & 0xFF),
-                             (((int) MHD_VERSION >> 8) & 0xFF));
+                             (int) (((uint32_t) MHD_VERSION >> 24) & 0xFF),
+                             (int) (((uint32_t) MHD_VERSION >> 16) & 0xFF),
+                             (int) (((uint32_t) MHD_VERSION >> 8) & 0xFF));
     if ((0 >= res) || (sizeof(ver) <= res))
-      return "0.0.0"; /* Can't return real version*/
+      return "0.0.0"; /* Can't return real version */
   }
   return ver;
 #endif /* !PACKAGE_VERSION */

-- 
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]