summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:42:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:42:28 +0000
commit33a2bb70562ae87235c9be95722a963129a13a38 (patch)
tree15839c3590b802065af623ef71fce4f75f561eed /lib
parentAdding upstream version 1.22.5. (diff)
downloaddpkg-33a2bb70562ae87235c9be95722a963129a13a38.tar.xz
dpkg-33a2bb70562ae87235c9be95722a963129a13a38.zip
Adding upstream version 1.22.6.upstream/1.22.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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. */