summaryrefslogtreecommitdiff
path: root/src/coredump
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-04-22 13:10:07 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-04-22 15:08:28 +0200
commitee00684c50a47fd1b56edc3ea06da42e3848a2b1 (patch)
treea0f2709423c7f0cf8cfa1fdff1ac2f21a0bc52bc /src/coredump
parent1d997b811411c1572e8771d95eb1597bfbb0f444 (diff)
downloadsystemd-ee00684c50a47fd1b56edc3ea06da42e3848a2b1.tar.gz
meson: use a single constant for default compression setting
Suggested by Daniele Nicolodi: https://github.com/systemd/systemd/pull/23160#discussion_r855853716 This is possible only if the macro is never used in #if, but only in C code. This means that all places that use #if have to be refactored into C, but we reduce the duplication a bit, and C is nicer to read than preprocessor conditionals.
Diffstat (limited to 'src/coredump')
-rw-r--r--src/coredump/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index 6055b91acb..003d4f74d1 100644
--- a/src/coredump/coredump.c
+++ b/src/coredump/coredump.c
@@ -462,7 +462,7 @@ static int save_external_coredump(
if (lseek(fd, 0, SEEK_SET) == (off_t) -1)
return log_error_errno(errno, "Failed to seek on coredump %s: %m", fn);
- fn_compressed = strjoin(fn, COMPRESSED_EXT);
+ fn_compressed = strjoin(fn, default_compression_extension());
if (!fn_compressed)
return log_oom();