diff options
Diffstat (limited to '')
-rw-r--r-- | lib/dpkg/compress.c | 3 | ||||
-rw-r--r-- | lib/dpkg/meminfo.c | 3 |
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. */ |