summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:42:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:42:36 +0000
commitf3cd649313063ef9d72a3a4a0ab5b4af598c8c9f (patch)
tree47e771e246377a3ee1211bdb2238e090970d6c24 /lib
parentReleasing progress-linux version 1.22.5-0.0~progress7.99u1. (diff)
downloaddpkg-f3cd649313063ef9d72a3a4a0ab5b4af598c8c9f.tar.xz
dpkg-f3cd649313063ef9d72a3a4a0ab5b4af598c8c9f.zip
Merging upstream version 1.22.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/dpkg/compress.c3
-rw-r--r--lib/dpkg/meminfo.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index adf26ea..9ae1590 100644
--- a/lib/dpkg/compress.c
+++ b/lib/dpkg/compress.c
@@ -42,6 +42,7 @@
#define DPKG_ZSTD_MAX_LEVEL 22
#define ZSTD_CLEVEL_DEFAULT 3
#endif
+#define DPKG_ZSTD_CLEVEL_DEFAULT ZSTD_CLEVEL_DEFAULT
#ifdef WITH_LIBBZ2
#include <bzlib.h>
#endif
@@ -1288,7 +1289,7 @@ compress_zstd(struct compress_params *params, int fd_in, int fd_out,
static const struct compressor compressor_zstd = {
.name = "zstd",
.extension = ".zst",
- .default_level = ZSTD_CLEVEL_DEFAULT,
+ .default_level = DPKG_ZSTD_CLEVEL_DEFAULT,
.fixup_params = fixup_none_params,
.compress = compress_zstd,
.decompress = decompress_zstd,
diff --git a/lib/dpkg/meminfo.c b/lib/dpkg/meminfo.c
index 998f65c..3288adf 100644
--- a/lib/dpkg/meminfo.c
+++ b/lib/dpkg/meminfo.c
@@ -129,8 +129,7 @@ meminfo_get_available_from_file(const char *filename, uint64_t *val)
if ((num == INTMAX_MAX) && errno == ERANGE)
return MEMINFO_INT_MAX;
/* It should end with ' kB\n'. */
- if (*end != ' ' || *(end + 1) != 'k' ||
- *(end + 2) != 'B')
+ if (end[0] != ' ' || end[1] != 'k' || end[2] != 'B')
return MEMINFO_NO_UNIT;
/* This should not overflow, but just in case. */