summaryrefslogtreecommitdiffstats
path: root/src/journal-remote
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-03-18 13:58:27 +0100
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-03-18 14:23:11 +0100
commit1da3cb81411e7c3d698fe20f95cc1c8145f2941c (patch)
tree520f0df7135e25623ec9c28830333aaa062c3442 /src/journal-remote
parentcoccinelle: add a transformation for GNU conditionals (diff)
downloadsystemd-1da3cb81411e7c3d698fe20f95cc1c8145f2941c.tar.xz
systemd-1da3cb81411e7c3d698fe20f95cc1c8145f2941c.zip
tree-wide: simplify x ? x : y to x ?: y where applicable
Diffstat (limited to 'src/journal-remote')
-rw-r--r--src/journal-remote/journal-gatewayd.c2
-rw-r--r--src/journal-remote/journal-upload.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
index a792c75cca..b6e8469922 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/journal-remote/journal-gatewayd.c
@@ -329,7 +329,7 @@ static int request_parse_range(
return r;
}
- p = (colon2 ? colon2 : colon) + 1;
+ p = (colon2 ?: colon) + 1;
if (*p) {
r = safe_atou64(p, &m->n_entries);
if (r < 0)
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index e42516c799..b9b310b664 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -801,7 +801,7 @@ static int open_journal(sd_journal **j) {
r = sd_journal_open(j, (arg_merge ? 0 : SD_JOURNAL_LOCAL_ONLY) | arg_journal_type);
if (r < 0)
log_error_errno(r, "Failed to open %s: %m",
- arg_directory ? arg_directory : arg_file ? "files" : "journal");
+ arg_directory ?: (arg_file ? "files" : "journal"));
return r;
}