summaryrefslogtreecommitdiffstats
path: root/lib/version.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2021-09-14 07:02:52 (GMT)
committerBrad King <brad.king@kitware.com>2021-09-15 19:28:31 (GMT)
commit386467c9dc939cd20711c451dd7d60341fd0e802 (patch)
tree73d1b75e65ec941fff25153f1a10b88dee1e6c2c /lib/version.c
parent18b2a8d7604f3aced9c93220806851f96e231f36 (diff)
downloadCMake-386467c9dc939cd20711c451dd7d60341fd0e802.zip
CMake-386467c9dc939cd20711c451dd7d60341fd0e802.tar.gz
CMake-386467c9dc939cd20711c451dd7d60341fd0e802.tar.bz2
curl 2021-09-14 (8e82f2a0)
Code extracted from: https://github.com/curl/curl.git at commit 8e82f2a04a238c54ba91e553e9a8452e6d405965 (curl-7_79_0).
Diffstat (limited to 'lib/version.c')
-rw-r--r--lib/version.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/version.c b/lib/version.c
index b67b9a4..c84ef85 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -75,28 +75,26 @@
#endif
#ifdef HAVE_BROTLI
-static size_t brotli_version(char *buf, size_t bufsz)
+static void brotli_version(char *buf, size_t bufsz)
{
uint32_t brotli_version = BrotliDecoderVersion();
unsigned int major = brotli_version >> 24;
unsigned int minor = (brotli_version & 0x00FFFFFF) >> 12;
unsigned int patch = brotli_version & 0x00000FFF;
-
- return msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
+ (void)msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
}
#endif
#ifdef HAVE_ZSTD
-static size_t zstd_version(char *buf, size_t bufsz)
+static void zstd_version(char *buf, size_t bufsz)
{
unsigned long zstd_version = (unsigned long)ZSTD_versionNumber();
unsigned int major = (unsigned int)(zstd_version / (100 * 100));
unsigned int minor = (unsigned int)((zstd_version -
- (major * 100 * 100)) / 100);
+ (major * 100 * 100)) / 100);
unsigned int patch = (unsigned int)(zstd_version -
- (major * 100 * 100) - (minor * 100));
-
- return msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
+ (major * 100 * 100) - (minor * 100));
+ (void)msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
}
#endif