}
r = bus_map_all_properties(
- system_bus ? : bus,
+ system_bus ?: bus,
"org.freedesktop.hostname1",
"/org/freedesktop/hostname1",
hostname_map,
#define STRV_IGNORE ((const char *) POINTER_MAX)
static inline const char* STRV_IFNOTNULL(const char *x) {
- return x ? x : STRV_IGNORE;
+ return x ?: STRV_IGNORE;
}
static inline bool strv_isempty(char * const *l) {
if (r < 0 && !ERRNO_IS_XATTR_ABSENT(r))
return r;
- r = mac_smack_apply_pid(0, exec_label ? : manager->default_smack_process_label);
+ r = mac_smack_apply_pid(0, exec_label ?: manager->default_smack_process_label);
if (r < 0)
return r;
}
return;
log_unit_error(UNIT(s), "Watchdog request (last status: %s)!",
- s->status_text ? s->status_text : "<unset>");
+ s->status_text ?: "<unset>");
service_enter_signal(s, SERVICE_STOP_WATCHDOG, SERVICE_FAILURE_WATCHDOG);
}
* find our way backwards if we want to break a cycle. We use
* a special marker for the beginning: we point to
* ourselves. */
- j->marker = from ? from : j;
+ j->marker = from ?: j;
j->generation = generation;
/* Actual ordering of jobs depends on the unit ordering dependency and job types. We need to traverse
#define filename_escape(s) xescape((s), "./ ")
static const char *coredump_tmpfile_name(const char *s) {
- return s ? s : "(unnamed temporary file)";
+ return s ?: "(unnamed temporary file)";
}
static int fix_permissions(
* defined) or entry "id" string (i.e. entry file name) otherwise. */
good_name = os_pretty_name ?: (os_image_id ?: (os_name ?: os_id));
- good_version = os_image_version ?: (os_version ?: (os_version_id ? : os_build_id));
+ good_version = os_image_version ?: (os_version ?: (os_version_id ?: os_build_id));
good_sort_key = os_image_id ?: os_id;
if (!good_name)
return r;
}
- p = (colon2 ? colon2 : colon) + 1;
+ p = (colon2 ?: colon) + 1;
if (*p) {
r = safe_atou64(p, &m->n_entries);
if (r < 0)
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;
}
/* seconds between sending first and last DISCOVER
* must always be strictly positive to deal with broken servers */
- secs = ((time_now - client->start_time) / USEC_PER_SEC) ? : 1;
+ secs = ((time_now - client->start_time) / USEC_PER_SEC) ?: 1;
packet->dhcp.secs = htobe16(secs);
/* RFC2131 section 4.1
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);
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);
if (arg_user || !uid_is_valid(arg_uid) || arg_uid == 0)
if (asprintf(envp + n_env++, "USER=%s", arg_user ?: "root") < 0 ||
- asprintf(envp + n_env++, "LOGNAME=%s", arg_user ? arg_user : "root") < 0)
+ asprintf(envp + n_env++, "LOGNAME=%s", arg_user ?: "root") < 0)
return log_oom();
assert(!sd_id128_is_null(arg_uuid));
_cleanup_free_ char *t = NULL;
t = strv_join((char**) extra_args, " ");
- systemctl = strjoina("systemctl ", t ? : "<args>");
- journalctl = strjoina("journalctl ", t ? : "<args>");
+ systemctl = strjoina("systemctl ", t ?: "<args>");
+ journalctl = strjoina("journalctl ", t ?: "<args>");
}
if (!isempty(result)) {