summaryrefslogtreecommitdiff
path: root/bus/policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'bus/policy.c')
-rw-r--r--bus/policy.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/bus/policy.c b/bus/policy.c
index c87bfecf..11d21bf0 100644
--- a/bus/policy.c
+++ b/bus/policy.c
@@ -1341,15 +1341,9 @@ bus_rules_check_can_own (DBusList *rules,
}
else if (rule->d.own.prefix)
{
- const char *data;
- char next_char;
- if (!_dbus_string_starts_with_c_str (service_name,
- rule->d.own.service_name))
- continue;
-
- data = _dbus_string_get_const_data (service_name);
- next_char = data[strlen (rule->d.own.service_name)];
- if (next_char != '\0' && next_char != '.')
+ if (!_dbus_string_starts_with_words_c_str (service_name,
+ rule->d.own.service_name,
+ '.'))
continue;
}