diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-03-18 13:58:27 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-03-18 14:23:11 +0100 |
commit | 1da3cb81411e7c3d698fe20f95cc1c8145f2941c (patch) | |
tree | 520f0df7135e25623ec9c28830333aaa062c3442 /src/journal-remote | |
parent | coccinelle: add a transformation for GNU conditionals (diff) | |
download | systemd-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.c | 2 | ||||
-rw-r--r-- | src/journal-remote/journal-upload.c | 2 |
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; } |