diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-06-30 11:09:55 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-06-30 23:23:34 +0200 |
commit | 63c76681827b5ae9017f6c981003cd75e5f127de (patch) | |
tree | bb6bd6e510568427ea63aab4f498e84c442eabf7 /lib/version.c | |
parent | 5372ee37d394b27f86ada8d9c50fc9b094c27675 (diff) | |
download | curl-63c76681827b5ae9017f6c981003cd75e5f127de.tar.gz |
version: turn version number functions into returning void
... as we never use the return codes from them.
Reviewed-by: Daniel Gustafsson
Closes #7319
Diffstat (limited to 'lib/version.c')
-rw-r--r-- | lib/version.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/version.c b/lib/version.c index b67b9a466..c84ef85fb 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 |