summaryrefslogtreecommitdiff
path: root/src/libsystemd
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/libsystemd
parent64254629f7e062a39156ee95428d46f2a1e82e06 (diff)
downloadsystemd-1da3cb81411e7c3d698fe20f95cc1c8145f2941c.tar.gz
tree-wide: simplify x ? x : y to x ?: y where applicable
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-device/device-enumerator.c2
-rw-r--r--src/libsystemd/sd-event/event-util.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c
index a583a37dab..0bd2c89eb6 100644
--- a/src/libsystemd/sd-device/device-enumerator.c
+++ b/src/libsystemd/sd-device/device-enumerator.c
@@ -769,7 +769,7 @@ static int enumerator_scan_dir(
if (!relevant_sysfs_subdir(de))
continue;
- if (!match_subsystem(enumerator, subsystem ? : de->d_name))
+ if (!match_subsystem(enumerator, subsystem ?: de->d_name))
continue;
k = enumerator_scan_dir_and_add_devices(enumerator, basedir, de->d_name, subdir);
diff --git a/src/libsystemd/sd-event/event-util.c b/src/libsystemd/sd-event/event-util.c
index 9863b07653..d93d8865ec 100644
--- a/src/libsystemd/sd-event/event-util.c
+++ b/src/libsystemd/sd-event/event-util.c
@@ -46,7 +46,7 @@ int event_reset_time(
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
"sd-event: Current clock id %i of event source \"%s\" is different from specified one %i.",
(int)c,
- strna((*s)->description ? : description),
+ strna((*s)->description ?: description),
(int)clock);
r = sd_event_source_set_time(*s, usec);