gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 05/14: MHD_get_version(): fixed signed value bit shift


From: gnunet
Subject: [libmicrohttpd] 05/14: MHD_get_version(): fixed signed value bit shift
Date: Tue, 19 Apr 2022 19:31:12 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit f71019f00b1d4b31b01dac2f98b46040cdd67b7e
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 fa4715e9..66f852d6 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -7901,11 +7901,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]