summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-bus/bus-internal.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-09-28 10:17:04 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2017-09-28 10:37:59 +0200
commit945c2931bb2666379663c91f922f3f5a2cb792bd (patch)
tree0a11d2f5fd8fa9a0db7bd9b2caa652087f98f0e9 /src/libsystemd/sd-bus/bus-internal.c
parentnetworkd: use assert_not_reached() (diff)
downloadsystemd-945c2931bb2666379663c91f922f3f5a2cb792bd.tar.xz
systemd-945c2931bb2666379663c91f922f3f5a2cb792bd.zip
libsystemd: use IN_SET macro
Diffstat (limited to 'src/libsystemd/sd-bus/bus-internal.c')
-rw-r--r--src/libsystemd/sd-bus/bus-internal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/sd-bus/bus-internal.c
index caca679086..dacd243c3e 100644
--- a/src/libsystemd/sd-bus/bus-internal.c
+++ b/src/libsystemd/sd-bus/bus-internal.c
@@ -148,7 +148,7 @@ bool service_name_is_valid(const char *p) {
(*q >= 'a' && *q <= 'z') ||
(*q >= 'A' && *q <= 'Z') ||
((!dot || unique) && *q >= '0' && *q <= '9') ||
- *q == '_' || *q == '-';
+ IN_SET(*q, '_', '-');
if (!good)
return false;