char * const *i;
STRV_FOREACH(i, l)
- if (strv_find(i+1, *i))
+ if (strv_contains(i+1, *i))
return false;
return true;
/* Process FD store messages. Either FDSTOREREMOVE=1 for removal, or FDSTORE=1 for addition. In both cases,
* process FDNAME= for picking the file descriptor name to use. Note that FDNAME= is required when removing
* fds, but optional when pushing in new fds, for compatibility reasons. */
- if (strv_find(tags, "FDSTOREREMOVE=1")) {
+ if (strv_contains(tags, "FDSTOREREMOVE=1")) {
const char *name;
name = strv_find_startswith(tags, "FDNAME=");
else
service_remove_fd_store(s, name);
- } else if (strv_find(tags, "FDSTORE=1")) {
+ } else if (strv_contains(tags, "FDSTORE=1")) {
const char *name;
name = strv_find_startswith(tags, "FDNAME=");
if (r < 0)
return log_error_errno(r, "Failed to convert PIN array: %m");
- if (strv_find(pins, pin))
+ if (strv_contains(pins, pin))
return 0;
r = strv_extend(&pins, pin);
if (!tags)
return log_oom();
- if (strv_find(tags, "READY=1")) {
+ if (strv_contains(tags, "READY=1")) {
r = sd_notify(false, "READY=1\n");
if (r < 0)
log_warning_errno(r, "Failed to send readiness notification, ignoring: %m");
if (!name_with_equal)
return log_oom();
- if (!filter || strv_find(filter, name) ||
+ if (!filter || strv_contains(filter, name) ||
(expected_value = strv_find_startswith(filter, name_with_equal))) {
r = sd_bus_message_peek_type(m, NULL, &contents);
if (r < 0)
if (!dot)
return false;
- if (!strv_find(arg_types, dot+1))
+ if (!strv_contains(arg_types, dot+1))
return false;
}
if (!strv_isempty(states) &&
- !strv_find(states, unit_file_state_to_string(u->state)))
+ !strv_contains(states, unit_file_state_to_string(u->state)))
return false;
return true;
if (!strv_fnmatch_or_empty(patterns, u->id, FNM_NOESCAPE))
return false;
- if (arg_types && !strv_find(arg_types, unit_type_suffix(u->id)))
+ if (arg_types && !strv_contains(arg_types, unit_type_suffix(u->id)))
return false;
if (arg_all)
return -ENOMEM;
STRV_FOREACH(i, a) {
- if (strv_find(l, *i))
+ if (strv_contains(l, *i))
continue;
if (strv_extend(&l, *i) < 0)
return -ENOMEM;
STRV_FOREACH(i, a) {
- if (strv_find(l, *i))
+ if (strv_contains(l, *i))
continue;
if (strv_extend(&l, *i) < 0)